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
This commit is contained in:
Anton Korobeynikov 2011-03-05 18:44:00 +00:00
parent b3fcc06d21
commit e516379d2a

View File

@ -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 {