mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
x86: don't accept base architectures as extensions
The -march= intentions are quite clear: A base architecture may be followed by any number of extensions. Accepting a base architecture in place of an extension will at best result in confusion, as the first of the two (or more) items specified simply would not take effect, due to being overridden by the later one(s).
This commit is contained in:
@ -13262,7 +13262,7 @@ md_parse_option (int c, const char *arg)
|
||||
*next++ = '\0';
|
||||
for (j = 0; j < ARRAY_SIZE (cpu_arch); j++)
|
||||
{
|
||||
if (strcmp (arch, cpu_arch [j].name) == 0)
|
||||
if (arch == saved && strcmp (arch, cpu_arch [j].name) == 0)
|
||||
{
|
||||
/* Processor. */
|
||||
if (! cpu_arch[j].flags.bitfield.cpui386)
|
||||
|
2
gas/testsuite/gas/i386/arch-10-5.l
Normal file
2
gas/testsuite/gas/i386/arch-10-5.l
Normal file
@ -0,0 +1,2 @@
|
||||
Assembler messages:
|
||||
Fatal error: .*
|
1
gas/testsuite/gas/i386/arch-10-5.s
Normal file
1
gas/testsuite/gas/i386/arch-10-5.s
Normal file
@ -0,0 +1 @@
|
||||
.text
|
@ -199,6 +199,7 @@ if [gas_32_check] then {
|
||||
run_list_test "arch-10-2" "-march=i686 -I${srcdir}/$subdir -al"
|
||||
run_list_test "arch-10-3" "-march=i686+mmx+sse4.2 -I${srcdir}/$subdir -al"
|
||||
run_list_test "arch-10-4" "-march=i686+mmx+sse4+vmx+smx -I${srcdir}/$subdir -al"
|
||||
run_list_test "arch-10-5" "-march=generic32+i686 -al"
|
||||
run_dump_test "arch-11"
|
||||
run_dump_test "arch-12"
|
||||
run_dump_test "arch-13"
|
||||
|
Reference in New Issue
Block a user