summaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2011-04-08 11:42:18 +0000
committerPaul Brook <paul@codesourcery.com>2011-04-08 11:42:18 +0000
commit2c29e9163ec87a5660c08f8ca0cfd9e10b5d84df (patch)
treeef9206d23cb8eb78212a86a5d109ce9061505d25 /binutils/testsuite
parentee5a1d9310641243c04942da31795e694a9d5a0f (diff)
downloadbinutils-redhat-2c29e9163ec87a5660c08f8ca0cfd9e10b5d84df.tar.gz
2011-04-07 Paul Carroll<pcarroll@codesourcery.com>
opcodes/ * arm-dis.c (print_insn): init vars moved into private_data structure. binutils/testsuite/ * binutils-all/arm/simple.s: Demo issue with objdump with multiple input files * binutils-all/arm/objdump.exp: added new ARM test case code
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/ChangeLog6
-rw-r--r--binutils/testsuite/binutils-all/arm/objdump.exp26
-rw-r--r--binutils/testsuite/binutils-all/arm/simple.s35
3 files changed, 67 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 5b927747bc..2d2981f82c 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-07 Paul Carroll<pcarroll@codesourcery.com>
+
+ * binutils-all/arm/simple.s: Demo issue with objdump with
+ multiple input files
+ * binutils-all/arm/objdump.exp: added new ARM test case code
+
2011-04-06 Joseph Myers <joseph@codesourcery.com>
* binutils-all/objcopy.exp (*arm*-*-coff): Change to arm*-*-coff.
diff --git a/binutils/testsuite/binutils-all/arm/objdump.exp b/binutils/testsuite/binutils-all/arm/objdump.exp
index d2e04fa35c..2b78db3ee7 100644
--- a/binutils/testsuite/binutils-all/arm/objdump.exp
+++ b/binutils/testsuite/binutils-all/arm/objdump.exp
@@ -61,3 +61,29 @@ if [regexp $want $got] then {
} else {
fail "thumb2-cond test2"
}
+
+###########################
+# Set up the test of multiple disassemblies
+###########################
+
+if {![binutils_assemble $srcdir/$subdir/simple.s tmpdir/simple.o]} then {
+ return
+}
+
+if [is_remote host] {
+ set objfile [remote_download host tmpdir/simple.o]
+} else {
+ set objfile tmpdir/simple.o
+}
+
+# Make sure multiple disassemblies come out the same
+
+set got [binutils_run $OBJDUMP "-dr $objfile $objfile"]
+
+set want "$objfile:\[ \]*file format.*$objfile:\[ \]*file format.*push.*add.*sub.*str.*add.*pop"
+
+if [regexp $want $got] then {
+ pass "multiple input files"
+} else {
+ fail "multiple input files"
+}
diff --git a/binutils/testsuite/binutils-all/arm/simple.s b/binutils/testsuite/binutils-all/arm/simple.s
new file mode 100644
index 0000000000..a486023564
--- /dev/null
+++ b/binutils/testsuite/binutils-all/arm/simple.s
@@ -0,0 +1,35 @@
+ .cpu arm7tdmi-s
+ .fpu softvfp
+ .file "y.c"
+ .bss
+ .align 2
+l:
+ .space 4
+ .text
+ .align 2
+ .global f1
+ .type f1, %function
+f1:
+ str fp, [sp, #-4]!
+ add fp, sp, #0
+ sub sp, sp, #12
+ str r0, [fp, #-8]
+ add sp, fp, #0
+ ldmfd sp!, {fp}
+ bx lr
+ .align 2
+ .word l
+ .size f1, .-f1
+ .align 2
+ .global main
+ .type main, %function
+main:
+ stmfd sp!, {fp, lr}
+ add fp, sp, #4
+ bx lr
+ .align 2
+ .word 1717986919
+ .word -1840700269
+ .word l
+ .size main, .-main
+ .ident "GCC: (Sourcery G++ 2011.03) 4.5.1"