Fix ARM unwind opcode assembler in several cases.
authorLogan Chien <tzuhsiang.chien@gmail.com>
Sun, 9 Jun 2013 12:22:30 +0000 (12:22 +0000)
committerLogan Chien <tzuhsiang.chien@gmail.com>
Sun, 9 Jun 2013 12:22:30 +0000 (12:22 +0000)
commit18cba562c8016f8095643b5dd8c4b34b294b62dd
tree5aad10d696d68909871a4743f444591b07007324
parent40e071c1eb3a6a57579f80b910ff7323048bbc09
Fix ARM unwind opcode assembler in several cases.

Changes to ARM unwind opcode assembler:

* Fix multiple .save or .vsave directives.  Besides, the
  order is preserved now.

* For the directives which will generate multiple opcodes,
  such as ".save {r0-r11}", the order of the unwind opcode
  is fixed now, i.e. the registers with less encoding value
  are popped first.

* Fix the $sp offset calculation.  Now, we can use the
  .setfp, .pad, .save, and .vsave directives at any order.

Changes to test cases:

* Add test cases to check the order of multiple opcodes
  for the .save directive.

* Fix the incorrect $sp offset in the test case.  The
  stack pointer offset specified in the test case was
  incorrect.  (Changed test cases: ehabi-mc-section.ll and
  ehabi-mc.ll)

* The opcode to restore $sp are slightly reordered.  The
  behavior are not changed, and the new output is same
  as the output of GNU as.  (Changed test cases:
  eh-directive-pad.s and eh-directive-setfp.s)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183627 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp
lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h
test/CodeGen/ARM/ehabi-mc-section.ll
test/CodeGen/ARM/ehabi-mc.ll
test/MC/ARM/eh-directive-integrated-test.s [new file with mode: 0644]
test/MC/ARM/eh-directive-multiple-offsets.s [new file with mode: 0644]
test/MC/ARM/eh-directive-pad.s
test/MC/ARM/eh-directive-save.s
test/MC/ARM/eh-directive-setfp.s