aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2007-08-09 15:11:07 +0000
committerPaul Brook <paul@codesourcery.com>2007-08-09 15:11:07 +0000
commit4396b6862a60b1add68552ddac6b8d68513e51e8 (patch)
treeb3067ab462af1852ae9dcc78e489a7e20d524769 /gas/testsuite
parentc309eac2074a11c52d122e543d197103c6020f6c (diff)
downloadgdb-4396b6862a60b1add68552ddac6b8d68513e51e8.zip
gdb-4396b6862a60b1add68552ddac6b8d68513e51e8.tar.gz
gdb-4396b6862a60b1add68552ddac6b8d68513e51e8.tar.bz2
2007-08-09 Paul Brook <paul@codesourcery.com>
gas/ * config/tc-arm.c (relaxed_symbol_addr): Compensate for alignment. gas/testsuite/ * gas/arm/relax_load_align.d: new test. * gas/arm/relax_load_align.s: new test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/arm/relax_load_align.d9
-rw-r--r--gas/testsuite/gas/arm/relax_load_align.s12
3 files changed, 26 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 60be6e6..1bbbec1 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-09 Paul Brook <paul@codesourcery.com>
+
+ * gas/arm/relax_load_align.d: new test.
+ * gas/arm/relax_load_align.s: new test.
+
2007-08-09 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Run sse4_1-intel, sse4_2-intel,
diff --git a/gas/testsuite/gas/arm/relax_load_align.d b/gas/testsuite/gas/arm/relax_load_align.d
new file mode 100644
index 0000000..0147b49
--- /dev/null
+++ b/gas/testsuite/gas/arm/relax_load_align.d
@@ -0,0 +1,9 @@
+# as: -march=armv6kt2
+# objdump: -dr --prefix-addresses --show-raw-insn
+
+.*: +file format .*arm.*
+
+Disassembly of section .text:
+0+000 <[^>]+> f510 707a adds.w r0, r0, #1000 ; 0x3e8
+0+004 <[^>]+> 4800 ldr r0, \[pc, #0\] \(0+008 <[^>]+>\)
+0+006 <[^>]+> 4800 ldr r0, \[pc, #0\] \(0+008 <[^>]+>\)
diff --git a/gas/testsuite/gas/arm/relax_load_align.s b/gas/testsuite/gas/arm/relax_load_align.s
new file mode 100644
index 0000000..e461291
--- /dev/null
+++ b/gas/testsuite/gas/arm/relax_load_align.s
@@ -0,0 +1,12 @@
+@ The relaxation algorithm used to not compensate for alignment statements.
+@ The early termination to avoid infinite looping would make the second load
+@ a wide instruction.
+ .text
+ .thumb
+ .syntax unified
+fn:
+ adds r0, r0, #1000
+ ldr r0, 1f
+ ldr r0, 1f
+.align 2
+1: