[PATCH] Implement AsmParser for ARM unwind directives.
Logan Chien
tzuhsiang.chien at gmail.com
Fri May 3 03:16:27 PDT 2013
Hi asl,
This commit implements the AsmParser for fnstart, fnend,
cantunwind, personality, handlerdata, pad, setfp, save, and
vsave directives.
This commit fixes some minor issue in the ARMELFStreamer:
* The switch back to corresponding section after the .fnend
directive.
* Emit the unwind opcode while processing .fnend directive
if there is no .handlerdata directive.
* Emit the unwind opcode to .ARM.extab while processing
.handlerdata even if .personality directive does not exist.
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 case 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.
* 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. (File: eh-directive-pad.s,
eh-directive-setfp.s)
http://llvm-reviews.chandlerc.com/D738
Files:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
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-compact-pr0.s
test/MC/ARM/eh-compact-pr1.s
test/MC/ARM/eh-directive-cantunwind-diagnostics.s
test/MC/ARM/eh-directive-cantunwind.s
test/MC/ARM/eh-directive-fnend-diagnostics.s
test/MC/ARM/eh-directive-fnstart-diagnostics.s
test/MC/ARM/eh-directive-handlerdata.s
test/MC/ARM/eh-directive-multiple-offsets.s
test/MC/ARM/eh-directive-pad-diagnostics.s
test/MC/ARM/eh-directive-pad.s
test/MC/ARM/eh-directive-personality-diagnostics.s
test/MC/ARM/eh-directive-personality.s
test/MC/ARM/eh-directive-save-diagnoatics.s
test/MC/ARM/eh-directive-save.s
test/MC/ARM/eh-directive-section-comdat.s
test/MC/ARM/eh-directive-section-multiple-func.s
test/MC/ARM/eh-directive-section.s
test/MC/ARM/eh-directive-setfp-diagnostics.s
test/MC/ARM/eh-directive-setfp.s
test/MC/ARM/eh-directive-text-section-multiple-func.s
test/MC/ARM/eh-directive-text-section.s
test/MC/ARM/eh-directive-vsave-diagnostics.s
test/MC/ARM/eh-directive-vsave.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D738.1.patch
Type: text/x-patch
Size: 107927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130503/233a6db3/attachment.bin>
More information about the llvm-commits
mailing list