aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2009-04-01 14:02:57 +0000
committerNathan Sidwell <nathan@codesourcery.com>2009-04-01 14:02:57 +0000
commite7495e4595478f4547f3d2b0647514ae4221a692 (patch)
tree2e5cd474f54a25ca20fbbde8a882aa00312c45d2 /gas/testsuite
parent42240548bff3ab683ff48c8eb0de53d1a9068aa4 (diff)
downloadgdb-e7495e4595478f4547f3d2b0647514ae4221a692.zip
gdb-e7495e4595478f4547f3d2b0647514ae4221a692.tar.gz
gdb-e7495e4595478f4547f3d2b0647514ae4221a692.tar.bz2
* config/tc-arm.c (do_nop): Generate v6k nops whenever possible.
(arm_handle_align): Generate v6k ARM, thumb2 wide & narrow nops whenever possible. testsuite/ * gas/arm/align.s, gas/arm/align.d: New. * gas/arm/thumb32.d, gas/arm/arch6zk.d, gas/arm/arch6zk.s, arm/thumb2_relax.d: Adjust for align changes.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/arm/align.d25
-rw-r--r--gas/testsuite/gas/arm/align.s14
-rw-r--r--gas/testsuite/gas/arm/arch6zk.d5
-rw-r--r--gas/testsuite/gas/arm/arch6zk.s7
-rw-r--r--gas/testsuite/gas/arm/thumb2_relax.d4
-rw-r--r--gas/testsuite/gas/arm/thumb32.d2
7 files changed, 51 insertions, 12 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 82db4f0..62708ea 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gas/arm/align.s, gas/arm/align.d: New.
+ * gas/arm/thumb32.d, gas/arm/arch6zk.d, gas/arm/arch6zk.s,
+ arm/thumb2_relax.d: Adjust for align changes.
+
2009-03-31 Peter Bergner <bergner@vnet.ibm.com>
* gas/ppc/power7.d ("ori", ".p2align"): Add tests for group ending nop.
diff --git a/gas/testsuite/gas/arm/align.d b/gas/testsuite/gas/arm/align.d
new file mode 100644
index 0000000..92aff42
--- /dev/null
+++ b/gas/testsuite/gas/arm/align.d
@@ -0,0 +1,25 @@
+# name: ARM V6t2 Alignment
+# as: -march=armv6kt2
+# objdump: -dr --prefix-addresses --show-raw-insn
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0+000 <[^>]*> bf00 nop
+0+002 <[^>]*> 4611 mov r1, r2
+0+004 <[^>]*> f3af 8000 nop.w
+0+008 <[^>]*> f3af 8000 nop.w
+0+00c <[^>]*> f3af 8000 nop.w
+0+010 <[^>]*> 4611 mov r1, r2
+0+012 <[^>]*> bf00 nop
+0+014 <[^>]*> f3af 8000 nop.w
+0+018 <[^>]*> e320f000 nop \{0\}
+0+01c <[^>]*> e1a01002 mov r1, r2
+0+020 <[^>]*> e1a01002 mov r1, r2
+0+024 <[^>]*> e320f000 nop \{0\}
+0+028 <[^>]*> e320f000 nop \{0\}
+0+02c <[^>]*> e320f000 nop \{0\}
+0+030 <[^>]*> e320f000 nop \{0\}
+0+034 <[^>]*> e320f000 nop \{0\}
+0+038 <[^>]*> e320f000 nop \{0\}
+0+03c <[^>]*> e320f000 nop \{0\}
diff --git a/gas/testsuite/gas/arm/align.s b/gas/testsuite/gas/arm/align.s
new file mode 100644
index 0000000..43c73ca
--- /dev/null
+++ b/gas/testsuite/gas/arm/align.s
@@ -0,0 +1,14 @@
+ .syntax unified
+ .thumb
+ nop
+ mov r1,r2
+ .p2align 4
+ mov r1,r2
+ .p2align 3
+
+ .arm
+ nop
+ mov r1,r2
+ .p2align 4
+ mov r1,r2
+ .p2align 5
diff --git a/gas/testsuite/gas/arm/arch6zk.d b/gas/testsuite/gas/arm/arch6zk.d
index e9dee21..7903957 100644
--- a/gas/testsuite/gas/arm/arch6zk.d
+++ b/gas/testsuite/gas/arm/arch6zk.d
@@ -26,7 +26,4 @@ Disassembly of section .text:
0+048 <[^>]*> e320f001 ? yield
0+04c <[^>]*> e16ec371 ? smc 60465
0+050 <[^>]*> 11613c7e ? smcne 5070
-0+054 <[^>]*> e1a00000 ? nop[ ]+\(mov r0,r0\)
-0+058 <[^>]*> e1a00000 ? nop[ ]+\(mov r0,r0\)
-0+05c <[^>]*> e1a00000 ? nop[ ]+\(mov r0,r0\)
-
+#...
diff --git a/gas/testsuite/gas/arm/arch6zk.s b/gas/testsuite/gas/arm/arch6zk.s
index 9339867..19c2c65 100644
--- a/gas/testsuite/gas/arm/arch6zk.s
+++ b/gas/testsuite/gas/arm/arch6zk.s
@@ -26,8 +26,5 @@ label:
smc 0xec31
smcne 0x13ce
- # Add three nop instructions to ensure that the
- # output is 32-byte aligned as required for arm-aout.
- nop
- nop
- nop
+ # Ensure output is 32-byte aligned as required for arm-aout.
+ .p2align 5
diff --git a/gas/testsuite/gas/arm/thumb2_relax.d b/gas/testsuite/gas/arm/thumb2_relax.d
index 327ef42..46b68e5 100644
--- a/gas/testsuite/gas/arm/thumb2_relax.d
+++ b/gas/testsuite/gas/arm/thumb2_relax.d
@@ -20,7 +20,7 @@ Disassembly of section .text:
0+02e <[^>]+> f89f 800c ldrb.w r8, \[pc, #12\] ; 0+03c <[^>]+>
0+032 <[^>]+> f89f 100a ldrb.w r1, \[pc, #10\] ; 0+03e <[^>]+>
0+036 <[^>]+> f81f 1038 ldrb.w r1, \[pc, #-56\] ; 0+000 <[^>]+>
-0+03a <[^>]+> 46c0 nop \(mov r8, r8\)
+0+03a <[^>]+> bf00 nop
0+03c <[^>]+> bf00 nop
0+03e <[^>]+> f995 1000 ldrsb.w r1, \[r5\]
0+042 <[^>]+> f995 1023 ldrsb.w r1, \[r5, #35\]
@@ -89,7 +89,7 @@ Disassembly of section .text:
0+126 <[^>]+> f8df 800c ldr.w r8, \[pc, #12\] ; 0+134 <[^>]+>
0+12a <[^>]+> f8df 100a ldr.w r1, \[pc, #10\] ; 0+136 <[^>]+>
0+12e <[^>]+> f85f 1036 ldr.w r1, \[pc, #-54\] ; 0+0fa <[^>]+>
-0+132 <[^>]+> 46c0 nop \(mov r8, r8\)
+0+132 <[^>]+> bf00 nop
0+134 <[^>]+> bf00 nop
0+136 <[^>]+> 7029 strb r1, \[r5, #0\]
0+138 <[^>]+> f885 1023 strb.w r1, \[r5, #35\]
diff --git a/gas/testsuite/gas/arm/thumb32.d b/gas/testsuite/gas/arm/thumb32.d
index 1e87241..c508b21 100644
--- a/gas/testsuite/gas/arm/thumb32.d
+++ b/gas/testsuite/gas/arm/thumb32.d
@@ -277,7 +277,7 @@ Disassembly of section .text:
0[0-9a-f]+ <[^>]+> e002 b\.n 0+358 <[^>]+>
0[0-9a-f]+ <[^>]+> e7d4 b\.n 0+2fe <[^>]+>
0[0-9a-f]+ <[^>]+> e000 b\.n 0+358 <[^>]+>
-0[0-9a-f]+ <[^>]+> 46c0 nop \(mov r8, r8\)
+0[0-9a-f]+ <[^>]+> bf00 nop
0[0-9a-f]+ <[^>]+> f43f affe beq\.w 0+358 <[^>]+>
0[0-9a-f]+ <[^>]+> f000 8058 beq\.w 0+410 <[^>]+>
0[0-9a-f]+ <[^>]+> f47f affa bne\.w 0+358 <[^>]+>