Otherwise I'll have to add another later in this series.
return offset + 16;
}
+static inline bool
+is_3src(enum opcode opcode)
+{
+ return opcode_descs[opcode].nsrc == 3;
+}
+
#ifdef __cplusplus
}
#endif
return imm == 0 || imm == 0xfffff000;
}
-/* Returns whether an opcode takes three sources. */
-static bool
-is_3src(uint32_t op)
-{
- return opcode_descs[op].nsrc == 3;
-}
-
/**
* Tries to compact instruction src into dst.
*
bool
backend_instruction::is_3src() const
{
- return opcode < ARRAY_SIZE(opcode_descs) && opcode_descs[opcode].nsrc == 3;
+ return ::is_3src(opcode);
}
bool