aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2007-06-06 17:36:54 +0000
committerPaul Brook <paul@codesourcery.com>2007-06-06 17:36:54 +0000
commitdce323d1dd7073d494525fa173502fb35bff7c95 (patch)
tree2754d0efee4e883fdc264b34055b3fe14f663713 /gas
parentd99344c0debc7307b5d64e4b0cd11afcb9fef21d (diff)
downloadgdb-dce323d1dd7073d494525fa173502fb35bff7c95.zip
gdb-dce323d1dd7073d494525fa173502fb35bff7c95.tar.gz
gdb-dce323d1dd7073d494525fa173502fb35bff7c95.tar.bz2
2007-06-06 Paul Brook <paul@codesourcery.com>
gas/ * config/tc-arm.c (s_align): Pad code sections appropriately. gas/testsuite/ * gas/arm/thumb.d: Update expected output. * gas/arm/thumb2_relax.d: Ditto.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/config/tc-arm.c14
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/arm/thumb.d6
-rw-r--r--gas/testsuite/gas/arm/thumb2_relax.d4
5 files changed, 26 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f1b6890..17217ed 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,7 @@
+2007-06-06 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (s_align): Pad code sections appropriately.
+
2007-06-05 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (insns): Correct Thumb-2 ldrd/strd opcodes.
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index ca9e337..339cab5 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -2613,6 +2613,7 @@ static void
s_align (int unused ATTRIBUTE_UNUSED)
{
int temp;
+ bfd_boolean fill_p;
long temp_fill;
long max_alignment = 15;
@@ -2629,16 +2630,25 @@ s_align (int unused ATTRIBUTE_UNUSED)
{
input_line_pointer++;
temp_fill = get_absolute_expression ();
+ fill_p = TRUE;
}
else
- temp_fill = 0;
+ {
+ fill_p = FALSE;
+ temp_fill = 0;
+ }
if (!temp)
temp = 2;
/* Only make a frag if we HAVE to. */
if (temp && !need_pass_2)
- frag_align (temp, (int) temp_fill, 0);
+ {
+ if (!fill_p && subseg_text_p (now_seg))
+ frag_align_code (temp, 0);
+ else
+ frag_align (temp, (int) temp_fill, 0);
+ }
demand_empty_rest_of_line ();
record_alignment (now_seg, temp);
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index d118298..2803af8 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-06 Paul Brook <paul@codesourcery.com>
+
+ * gas/arm/thumb.d: Update expected output.
+ * gas/arm/thumb2_relax.d: Ditto.
+
2007-06-05 Paul Brook <paul@codesourcery.com>
* gas/arm/thumb32.d: Add writeback addressing mode tests.
diff --git a/gas/testsuite/gas/arm/thumb.d b/gas/testsuite/gas/arm/thumb.d
index 8677330..7f9b253 100644
--- a/gas/testsuite/gas/arm/thumb.d
+++ b/gas/testsuite/gas/arm/thumb.d
@@ -50,7 +50,7 @@ Disassembly of section \.text:
0+050 <[^>]+> 46c0 nop \(mov r8, r8\)
0+052 <[^>]+> 4738 bx r7
0+054 <[^>]+> 4740 bx r8
-0+056 <[^>]+> 0000 lsls r0, r0, #0
+0+056 <[^>]+> 46c0 nop \(mov r8, r8\)
0+058 <[^>]+> 4778 bx pc
0+05a <[^>]+> 4b20 ldr r3, \[pc, #128\] \(0+0dc <[^>]+>\)
0+05c <[^>]+> 4c02 ldr r4, \[pc, #8\] \(0+068 <[^>]+>\)
@@ -58,7 +58,7 @@ Disassembly of section \.text:
0+060 <[^>]+> 5511 strb r1, \[r2, r4\]
0+062 <[^>]+> 59f5 ldr r5, \[r6, r7\]
0+064 <[^>]+> 5d62 ldrb r2, \[r4, r5\]
- \.\.\.
+0+066 <[^>]+> 46c0 nop \(mov r8, r8\)
0+068 <[^>]+> 52d1 strh r1, \[r2, r3\]
0+06a <[^>]+> 5a23 ldrh r3, \[r4, r0\]
0+06c <[^>]+> 57f1 ldrsb r1, \[r6, r7\]
@@ -134,7 +134,7 @@ Disassembly of section \.text:
0+106 <[^>]+> f000 f815 bl 0+134 <[^>]+>
0+10a <[^>]+> 4700 bx r0
0+10c <[^>]+> dfff (swi|svc) 255
- \.\.\.
+0+10e <[^>]+> 46c0 nop \(mov r8, r8\)
0+110 <[^>]+> d010 beq.n 0+134 <[^>]+>
0+112 <[^>]+> d10f bne.n 0+134 <[^>]+>
0+114 <[^>]+> d20e bcs.n 0+134 <[^>]+>
diff --git a/gas/testsuite/gas/arm/thumb2_relax.d b/gas/testsuite/gas/arm/thumb2_relax.d
index 980f87a..327ef42 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 <[^>]+> 0000 lsls r0, r0, #0
+0+03a <[^>]+> 46c0 nop \(mov r8, r8\)
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 <[^>]+> 0000 lsls r0, r0, #0
+0+132 <[^>]+> 46c0 nop \(mov r8, r8\)
0+134 <[^>]+> bf00 nop
0+136 <[^>]+> 7029 strb r1, \[r5, #0\]
0+138 <[^>]+> f885 1023 strb.w r1, \[r5, #35\]