diff options
author | David S. Miller <davem@redhat.com> | 2012-11-20 08:37:52 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 2012-11-20 08:37:52 +0000 |
commit | f793d1fab06ebffee10c9a53275bf5866785c043 (patch) | |
tree | 01fcf9123f223d4e9a7889f2b22bed9eb856991e /gas/config/tc-sparc.c | |
parent | a3e2f1ca995ff6bda227090afffb8c375484b24e (diff) | |
download | binutils-redhat-f793d1fab06ebffee10c9a53275bf5866785c043.tar.gz |
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/tc-sparc.c')
-rw-r--r-- | gas/config/tc-sparc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index fe7f8b01cc..d35b188204 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. */ |