[SystemZ] Match operands to fields by name rather than by order
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 14 May 2013 09:36:44 +0000 (09:36 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Tue, 14 May 2013 09:36:44 +0000 (09:36 +0000)
commitf917bc0406e47866eb1f6c0378de16498018b620
tree157352326b05dda374fd4f4d9e905362a4191110
parent055ac429cc995c78be4aee552ea51be7b32efbf1
[SystemZ] Match operands to fields by name rather than by order

The SystemZ port currently relies on the order of the instruction operands
matching the order of the instruction field lists.  This isn't desirable
for disassembly, where the two are matched only by name.  E.g. the R1 and R2
fields of an RR instruction should have corresponding R1 and R2 operands.

The main complication is that addresses are compound operands,
and as far as I know there is no mechanism to allow individual
suboperands to be selected by name in "let Inst{...} = ..." assignments.
Luckily it doesn't really matter though.  The SystemZ instruction
encoding groups all address fields together in a predictable order,
so it's just as valid to see the entire compound address operand as
a single field.  That's the approach taken in this patch.

Matching by name in turn means that the operands to COPY SIGN and
CONVERT TO FIXED instructions can be given in natural order.
(It was easier to do this at the same time as the rename,
since otherwise the intermediate step was too confusing.)

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181771 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h