This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] use do_align () directly in tc-ia64.c


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0a433ebc90ae1d3d86382757aa049a0e91bd5019

commit 0a433ebc90ae1d3d86382757aa049a0e91bd5019
Author: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Date:   Sun Feb 28 18:00:00 2016 -0500

    use do_align () directly in tc-ia64.c
    
    gas/ChangeLog:
    
    2016-03-22  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.

Diff:
---
 gas/ChangeLog        |  7 +++++++
 gas/config/tc-ia64.c | 29 ++++++++++-------------------
 2 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 4aa1292..0c5d973 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
 2016-03-22  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.
+
+2016-03-22  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
 	* listing.c (listing_message): Use XNEW style allocation macros.
 	* read.c (read_a_source_file): Likewise.
 	(read_symbol_name): Likewise.
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index c2f7372..edb2683 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);
     }
 }
 
@@ -4290,7 +4281,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;
@@ -4843,20 +4834,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);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]