aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-10-05 13:51:40 +0000
committerNick Clifton <nickc@redhat.com>2004-10-05 13:51:40 +0000
commit7ed4c4c5d0100ac29e959ab0fa86fb01607398b1 (patch)
tree49eff82aa7357671f93da0fc069e8b84a8d6e563 /gas/testsuite
parent1763908f7c2545948b1ba87b103634e219a7769b (diff)
downloadfsf-binutils-gdb-7ed4c4c5d0100ac29e959ab0fa86fb01607398b1.zip
fsf-binutils-gdb-7ed4c4c5d0100ac29e959ab0fa86fb01607398b1.tar.gz
fsf-binutils-gdb-7ed4c4c5d0100ac29e959ab0fa86fb01607398b1.tar.bz2
Add support for generating ARM unwind tables.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/arm/arm.exp3
-rw-r--r--gas/testsuite/gas/arm/unwind.d33
-rw-r--r--gas/testsuite/gas/arm/unwind.s46
3 files changed, 81 insertions, 1 deletions
diff --git a/gas/testsuite/gas/arm/arm.exp b/gas/testsuite/gas/arm/arm.exp
index 732468a..d1578ec 100644
--- a/gas/testsuite/gas/arm/arm.exp
+++ b/gas/testsuite/gas/arm/arm.exp
@@ -58,10 +58,11 @@ if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then {
run_errors_test "r15-bad" "" "Invalid use of r15 errors"
run_errors_test "undefined" "" "Undefined local label error"
- if {[istarget *-*-elf*] || [istarget *-*-linux*]} then {
+ if {[istarget *-*-*elf*] || [istarget *-*-linux*] || [istarget *-*-*eabi]} then {
run_dump_test "pic"
run_dump_test "mapping"
gas_test "bignum1.s" "" $stdoptlist "bignums"
+ run_dump_test "unwind"
}
if {! [istarget arm*-*-aout] && ![istarget arm-*-pe]} then {
diff --git a/gas/testsuite/gas/arm/unwind.d b/gas/testsuite/gas/arm/unwind.d
new file mode 100644
index 0000000..63f9fdb
--- /dev/null
+++ b/gas/testsuite/gas/arm/unwind.d
@@ -0,0 +1,33 @@
+#objdump: -sr
+#name: Unwind table generation
+
+.*: file format.*
+
+RELOCATION RECORDS FOR \[.ARM.extab\]:
+OFFSET TYPE VALUE
+0000000c R_ARM_PREL31 .text
+
+
+RELOCATION RECORDS FOR \[.ARM.exidx\]:
+OFFSET TYPE VALUE
+00000000 R_ARM_REL32 .text
+00000008 R_ARM_REL32 .text
+0000000c R_ARM_PREL31 .ARM.extab
+00000010 R_ARM_REL32 .text
+00000014 R_ARM_PREL31 .ARM.extab
+00000018 R_ARM_REL32 .text
+0000001c R_ARM_PREL31 .ARM.extab
+00000020 R_ARM_REL32 .text
+
+
+Contents of section .text:
+ 0000 (0000a0e3 0100a0e3 0200a0e3 0300a0e3|e3a00000 a0e30001 e3a00002 e3a00003) .*
+ 0010 (0420|2004) .*
+Contents of section .ARM.extab:
+ 0000 (449b0181 b0b08086|81019b44 8680b0b0) 00000000 00000000 .*
+ 0010 (8402b101 b0b0b005 2a000000 00c60181|01b10284 05b0b0b0 000000a2 8101c600) .*
+ 0020 (b0b0c1c1|c1c1b0b0) 00000000 .*
+Contents of section .ARM.exidx:
+ 0000 00000000 (b0b0a880 04000000|80a8b0b0 00000004) 00000000 .*
+ 0010 (08000000 0c000000 0c000000 1c000000|00000008 0000000c 0000000c 0000001c) .*
+ 0020 (10000000 08849780|00000010 80978480) .*
diff --git a/gas/testsuite/gas/arm/unwind.s b/gas/testsuite/gas/arm/unwind.s
new file mode 100644
index 0000000..43f01e6
--- /dev/null
+++ b/gas/testsuite/gas/arm/unwind.s
@@ -0,0 +1,46 @@
+# Test generation of unwind tables
+ .text
+foo: @ Simple function
+ .fnstart
+ .save {r4, lr}
+ mov r0, #0
+ .fnend
+foo1: @ Typical frame pointer prologue
+ .fnstart
+ .movsp ip
+ @mov ip, sp
+ .pad #4
+ .save {fp, ip, lr}
+ @stmfd sp!, {fp, ip, lr, pc}
+ .setfp fp, ip, #4
+ @sub fp, ip, #4
+ mov r0, #1
+ .fnend
+foo2: @ Custom personality routine
+ .fnstart
+ .save {r1, r4, r6, lr}
+ @stmfd {r1, r4, r6, lr}
+ mov r0, #2
+ .personality foo
+ .handlerdata
+ .word 42
+ .fnend
+foo3: @ Saving iwmmxt registers
+ .fnstart
+ .save {wr11}
+ .save {wr10}
+ .save {wr10, wr11}
+ .save {wr0}
+ mov r0, #3
+ .fnend
+ .code 16
+foo4: @ Thumb frame pointer
+ .fnstart
+ .save {r7, lr}
+ @push {r7, lr}
+ .setfp r7, sp
+ @mov r7, sp
+ .pad #8
+ @sub sp, sp, #8
+ mov r0, #4
+ .fnend