This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH]: Make GAS --64 behavior more reasonable on sparc.
- From: David Miller <davem at davemloft dot net>
- To: binutils at sourceware dot org
- Date: Fri, 13 Mar 2009 14:07:18 -0700 (PDT)
- Subject: [PATCH]: Make GAS --64 behavior more reasonable on sparc.
If the user gives us --64 on the command-line, it makes no
sense to restict instructions to pre-V9 architectures.
This also fixes the LD testsuite when run on 32-bit sparc.
Specifically sparc.exp's gotopt64.s is built with GAS using
--64 but this is rejected because the architecture is set
to the default, which is 'sparclite', and that doesn't make
any sense.
At some point we should bump DEFAULT_ARCH as is suggested by the
comment above it's definition. But that's a seperate change.
Ok to apply?
2009-03-13 David S. Miller <davem@davemloft.net>
* config/tc-sparc.c (md_parse_option): If the user gives
us '--64' make sure max_architecture is at least V9.
Index: gas/config/tc-sparc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sparc.c,v
retrieving revision 1.75
diff -u -p -r1.75 tc-sparc.c
--- gas/config/tc-sparc.c 12 Aug 2008 23:39:31 -0000 1.75
+++ gas/config/tc-sparc.c 13 Mar 2009 21:03:00 -0000
@@ -542,6 +542,10 @@ md_parse_option (int c, char *arg)
as_fatal (_("No compiled in support for %d bit object file format"),
sparc_arch_size);
free (list);
+
+ if (sparc_arch_size == 64
+ && max_architecture < SPARC_OPCODE_ARCH_V9)
+ max_architecture = SPARC_OPCODE_ARCH_V9;
}
break;