aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2012-11-20 08:37:52 +0000
committerDavid S. Miller <davem@redhat.com>2012-11-20 08:37:52 +0000
commit668b27eacf911204998fe203a610d4d101f45d06 (patch)
treea465a8e7e4bfe4f27c9f5d1f7b97e3e4bd3387f9 /gas/config
parentbd0cfc4d46e8ad3ddaebc2dd3d8c7f93b1da751d (diff)
downloadgdb-668b27eacf911204998fe203a610d4d101f45d06.zip
gdb-668b27eacf911204998fe203a610d4d101f45d06.tar.gz
gdb-668b27eacf911204998fe203a610d4d101f45d06.tar.bz2
Fix sparc bitness overrides in GAS. Noticed by Eric Botcazou.
gas/ * config/tc-sparc.c (md_parse_option): Only certain arch specifications should override the object to be 32-bit or 64-bit.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-sparc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index fe7f8b0..d35b188 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -480,10 +480,18 @@ md_parse_option (int c, char *arg)
case OPTION_XARCH:
#ifdef OBJ_ELF
- if (strncmp (arg, "v9", 2) != 0)
- md_parse_option (OPTION_32, NULL);
- else
+ if (!strncmp (arg, "v9", 2))
md_parse_option (OPTION_64, NULL);
+ else
+ {
+ if (!strncmp (arg, "v8", 2)
+ || !strncmp (arg, "v7", 2)
+ || !strncmp (arg, "v6", 2)
+ || !strcmp (arg, "sparclet")
+ || !strcmp (arg, "sparclite")
+ || !strcmp (arg, "sparc86x"))
+ md_parse_option (OPTION_32, NULL);
+ }
#endif
/* Fall through. */