aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.c
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/config/tc-arm.c
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/config/tc-arm.c')
-rw-r--r--gas/config/tc-arm.c14
1 files changed, 12 insertions, 2 deletions
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);