Skip to content

Commit

Permalink
ARM64: Extended addressing mode source reg is 64-bit.
Browse files Browse the repository at this point in the history
The canonical form for the extended addressing mode (e.g.,
"[x1, w2, uxtw brson#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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206797 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Jim Grosbach committed Apr 21, 2014
1 parent e1c0863 commit fa49d1a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Target/ARM64/Disassembler/ARM64Disassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1182,11 +1182,7 @@ static DecodeStatus DecodeRegOffsetLdStInstruction(llvm::MCInst &Inst,
}

DecodeGPR64spRegisterClass(Inst, Rn, Addr, Decoder);

if ((extendHi & 0x3) == 0x3)
DecodeGPR64RegisterClass(Inst, Rm, Addr, Decoder);
else
DecodeGPR32RegisterClass(Inst, Rm, Addr, Decoder);
DecodeGPR64RegisterClass(Inst, Rm, Addr, Decoder);

Inst.addOperand(MCOperand::CreateImm(extend));
return Success;
Expand Down

0 comments on commit fa49d1a

Please sign in to comment.