From: Paul Brook Date: Wed, 6 Jun 2007 17:36:54 +0000 (+0000) Subject: 2007-06-06 Paul Brook X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dce323d1dd7073d494525fa173502fb35bff7c95;p=binutils-gdb.git 2007-06-06 Paul Brook 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index f1b6890837b..17217ed53fe 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2007-06-06 Paul Brook + + * config/tc-arm.c (s_align): Pad code sections appropriately. + 2007-06-05 Paul Brook * 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 ca9e33767f5..339cab5db8f 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 d1182982ee3..2803af8eab7 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-06-06 Paul Brook + + * gas/arm/thumb.d: Update expected output. + * gas/arm/thumb2_relax.d: Ditto. + 2007-06-05 Paul Brook * 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 867733050f1..7f9b253a443 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 980f87a2193..327ef42b534 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\]