This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] use do_align () directly in tc-ia64.c
- From: tbsaunde+binutils at tbsaunde dot org
- To: binutils at sourceware dot org
- Cc: Trevor Saunders <tbsaunde+binutils at tbsaunde dot org>
- Date: Sun, 20 Mar 2016 09:43:00 -0400
- Subject: [PATCH] use do_align () directly in tc-ia64.c
- Authentication-results: sourceware.org; auth=none
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Hi,
built and regtested a cross to ia64-elf with no regressions, ok?
Trev
gas/ChangeLog:
2016-03-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-ia64.c (ia64_do_align): Remove.
(ia64_cons_align): Call do_align () directly.
(dot_proc): Likewise.
(stmt_float_cons): Likewise.
---
gas/config/tc-ia64.c | 29 ++++++++++-------------------
1 file changed, 10 insertions(+), 19 deletions(-)
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index e43a7f9..fa77f5a 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -1025,25 +1025,16 @@ ia64_flush_insns (void)
as_bad (_("qualifying predicate not followed by instruction"));
}
-static void
-ia64_do_align (int nbytes)
-{
- char *saved_input_line_pointer = input_line_pointer;
-
- input_line_pointer = "";
- s_align_bytes (nbytes);
- input_line_pointer = saved_input_line_pointer;
-}
-
void
ia64_cons_align (int nbytes)
{
if (md.auto_align)
{
- char *saved_input_line_pointer = input_line_pointer;
- input_line_pointer = "";
- s_align_bytes (nbytes);
- input_line_pointer = saved_input_line_pointer;
+ int log;
+ for (log = 0; (nbytes & 1) != 1; nbytes >>= 1)
+ log++;
+
+ do_align (log, NULL, 0, 0);
}
}
@@ -4305,7 +4296,7 @@ dot_proc (int dummy ATTRIBUTE_UNUSED)
}
last_pending->next = NULL;
demand_empty_rest_of_line ();
- ia64_do_align (16);
+ do_align (4, NULL, 0, 0);
unwind.prologue = 0;
unwind.prologue_count = 0;
@@ -4858,20 +4849,20 @@ stmt_float_cons (int kind)
switch (kind)
{
case 'd':
- alignment = 8;
+ alignment = 3;
break;
case 'x':
case 'X':
- alignment = 16;
+ alignment = 4;
break;
case 'f':
default:
- alignment = 4;
+ alignment = 2;
break;
}
- ia64_do_align (alignment);
+ do_align (alignment, NULL, 0, 0);
float_cons (kind);
}
--
2.1.4