ARM64: Extended addressing mode source reg is 64-bit.

The canonical form for the extended addressing mode (e.g.,
"[x1, w2, uxtw #3]" is for the MCInst to have the second register be the
full 64-bit GPR64 register class. The instruction printer cleans up
the output for display to show the 32-bit register instead, per the
specification.

This simplifies 205893 now that the aliasing is handled in the printer
in 206495 so that the codegen path and the disassembler path give the
same MCInst form.

llvm-svn: 206797
This commit is contained in:
Jim Grosbach 2014-04-21 21:45:44 +00:00
parent 09757491d6
commit 9d205d42f3
1 changed files with 1 additions and 5 deletions

View File

@ -1182,11 +1182,7 @@ static DecodeStatus DecodeRegOffsetLdStInstruction(llvm::MCInst &Inst,
} }
DecodeGPR64spRegisterClass(Inst, Rn, Addr, Decoder); DecodeGPR64spRegisterClass(Inst, Rn, Addr, Decoder);
DecodeGPR64RegisterClass(Inst, Rm, Addr, Decoder);
if ((extendHi & 0x3) == 0x3)
DecodeGPR64RegisterClass(Inst, Rm, Addr, Decoder);
else
DecodeGPR32RegisterClass(Inst, Rm, Addr, Decoder);
Inst.addOperand(MCOperand::CreateImm(extend)); Inst.addOperand(MCOperand::CreateImm(extend));
return Success; return Success;