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] Fixes a thinko in the implementation of the V850 -m8byte-align and -m4byte-align command line option


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

commit a26de52c63a8b4da94e8e1c8b308b938b2434808
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Mar 5 13:04:33 2015 +0000

    Fixes a thinko in the implementation of the V850 -m8byte-align and -m4byte-align command line options.
    
    	* config/tc-v850.c (md_parse_option): Fix code to set or clear
    	EF_RH850_DATA_ALIGN8 bit in ELF header, based upon the use of the
    	-m8byte-align and -m4byte-align command line options.

Diff:
---
 gas/ChangeLog        |  6 ++++++
 gas/config/tc-v850.c | 14 ++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index d6d6c95..3044668 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-05  Nick Clifton  <nickc@redhat.com>
+
+	* config/tc-v850.c (md_parse_option): Fix code to set or clear
+	EF_RH850_DATA_ALIGN8 bit in ELF header, based upon the use of the
+	-m8byte-align and -m4byte-align command line options.
+
 2015-03-04  Richard Sandiford  <richard.sandiford@arm.com>
 
 	PR gas/17843
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index fc55106..dec8739 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -1653,17 +1653,19 @@ md_parse_option (int c, char *arg)
       v850_target_format = "elf32-v850-rh850";
     }
   else if (strcmp (arg, "8byte-align") == 0)
-    v850_data_8 = TRUE;
+    {
+      v850_data_8 = TRUE;
+      v850_e_flags |= EF_RH850_DATA_ALIGN8;
+    }
   else if (strcmp (arg, "4byte-align") == 0)
-    v850_data_8 = FALSE;
+    {
+      v850_data_8 = FALSE;
+      v850_e_flags &= ~ EF_RH850_DATA_ALIGN8;
+    }
   else if (strcmp (arg, "soft-float") == 0)
     soft_float = 1;
   else if (strcmp (arg, "hard-float") == 0)
     soft_float = 0;
-  else if (strcmp (arg, "8byte-align") == 0)
-    v850_e_flags |= EF_RH850_DATA_ALIGN8;
-  else if (strcmp (arg, "4byte-align") == 0)
-    v850_e_flags &= ~ EF_RH850_DATA_ALIGN8;
   else
     return 0;


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