[PATCH] llvm-readobj: add support for ARM EHABI unwind info

Saleem Abdulrasool compnerd at compnerd.org
Mon Jan 6 20:50:50 PST 2014



================
Comment at: test/tools/llvm-readobj/arm-unwind.s:25
@@ +24,3 @@
+	.fnend
+
+
----------------
Logan Chien wrote:
> It will be great if you include .personality1 in your test as well.  FYI.
> 
> 	.syntax unified
> 	.cpu cortex-a9
> 
> 	.section .personality1
> 	.align 2
> 	.global personality1
> 	.type personality1,%function
> personality1:
> 	.fnstart
> 	.pad #0x100
> 	sub sp, sp, #0x100
> 	.save {r0-r11}
> 	push {r0-r11}
> 	pop {r0-r11}
> 	add sp, sp, #0x100
> 	bx lr
> 	.fnend
> 
Good idea, I should have added that.

================
Comment at: tools/llvm-readobj/ARMEHABIPrinter.h:117
@@ +116,3 @@
+
+  /// ARM EHABI §6.2 - The generic model
+  ///
----------------
Logan Chien wrote:
> There is some strange symbol in this line.
Force of habit (its a section symbol), replaced with Section.

================
Comment at: tools/llvm-readobj/ARMEHABIPrinter.h:129
@@ +128,3 @@
+  ///
+  /// ARM EHABI § 6.3 - The ARM-defined compact model
+  ///
----------------
Logan Chien wrote:
> There is some strange symbol in this line.
Same.

================
Comment at: tools/llvm-readobj/ARMEHABIPrinter.h:149
@@ +148,3 @@
+
+    switch (PersonalityIndex) {
+    case AEABI_UNWIND_CPP_PR0:
----------------
Logan Chien wrote:
> In fact, the only possible personality index is 0.  For the other personality index, they should be placed in .ARM.extab section.  (It will be helpful to have a look to the personality1 test case which I have given above.)
This is routine which parses the extab (and in fact, the current code parses it just fine).

================
Comment at: tools/llvm-readobj/ARMEHABIPrinter.h:236
@@ +235,3 @@
+
+      PrintByteCode(Contents->slice(Entry * IndexTableEntrySize + 4, 3));
+    } else {
----------------
Logan Chien wrote:
> Should this be "(Entry * IndexTableEntrySize + 5)" instead?  The 0x80 itself is not an unwind opcode.
No, it should be + 4 as is.The offset is to get to the second word.  The length of three is due to the fact that the first byte is not an actual unwind opcode (as you noted).


http://llvm-reviews.chandlerc.com/D2513



More information about the llvm-commits mailing list