diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2011-03-05 18:44:00 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2011-03-05 18:44:00 +0000 |
commit | e516379d2a2fd1ad7583b2fa289051da517d8a42 (patch) | |
tree | babbdde874e91417b70caa37f9cb4a89be539aa8 | |
parent | b3fcc06d2124f9d01e3b48097b44cc141309908e (diff) | |
download | external_llvm-e516379d2a2fd1ad7583b2fa289051da517d8a42.zip external_llvm-e516379d2a2fd1ad7583b2fa289051da517d8a42.tar.gz external_llvm-e516379d2a2fd1ad7583b2fa289051da517d8a42.tar.bz2 |
ARM assembler stuff is crazy: for .setfp positive values of offset corresponds to "add" instruction, not to "sub" as in .pad case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127106 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 135148d..e1a2cc5 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -916,10 +916,11 @@ void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) { } if (DstReg == FramePtr && FramePtr != ARM::SP) - // Set-up of the frame pointer. - OutStreamer.EmitSetFP(FramePtr, ARM::SP, Offset); + // Set-up of the frame pointer. Positive values correspond to "add" + // instruction. + OutStreamer.EmitSetFP(FramePtr, ARM::SP, -Offset); else if (DstReg == ARM::SP) { - // Change of SP by an offset. Positive values corresponds to "sub" + // Change of SP by an offset. Positive values correspond to "sub" // instruction. OutStreamer.EmitPad(Offset); } else { |