instrs: Clearly separate vector and GP opsize

Now, an instruction cannot refer to the GP operand size and the vector
operand size at the same time. This isn't necessary, all necessary
distinguishing could also be achieved manually using W0/W1/66 selectors.
This commit is contained in:
Alexis Engelke
2022-11-27 17:01:06 +01:00
parent 64f0ae245e
commit f565f09f9d
4 changed files with 23 additions and 20 deletions

View File

@@ -227,6 +227,9 @@ class InstrDesc(NamedTuple):
extraflags = {}
opsz = set(self.OPKIND_SIZES[opkind.size] for opkind in self.operands)
# Operand size either refers to vectors or GP, but not both
if -2 in opsz and -3 in opsz:
raise Exception(f"conflicting gp vs. vec operand size in {self}")
# Sort fixed sizes encodable in size_fix2 as second element.
fixed = sorted((x for x in opsz if x >= 0), key=lambda x: 1 <= x <= 4)