mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
x86: Don't display --32/--64/--x32 without BFD64
For 32-bit x86 assembler, --64 and --x32 are unsupported if BFD64 is undefined. Even if BFD64 is defined, --64 and --x32 still may not be supported if x86-64 support isn't compiled in: [hjl@gnu-hsw-1 gas]$ ./as-new --64 -o x.o x.s Assembler messages: Fatal error: no compiled in support for x86_64 [hjl@gnu-hsw-1 gas]$ ./as-new --x32 -o x.o x.s Assembler messages: Fatal error: no compiled in support for 32bit x86_64 [hjl@gnu-hsw-1 gas]$ This patch removes --32/--64/--x32 from md_show_usage if BFD64 is undefined and runs code64-inval only if BFD64 is undefined. * config/tc-i386.c (md_show_usage): Don't display --32/--64/--x32 if BFD64 is undefined. * testsuite/gas/i386/i386.exp (gas_bfd64_check): New. Run code64-inval if gas_bfd64_check fails.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* config/tc-i386.c (md_show_usage): Don't display --32/--64/--x32
|
||||||
|
if BFD64 is undefined.
|
||||||
|
* testsuite/gas/i386/i386.exp (gas_bfd64_check): New.
|
||||||
|
Run code64-inval if gas_bfd64_check fails.
|
||||||
|
|
||||||
2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
|
2018-08-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* testsuite/gas/i386/evex-no-scale.s: Removed.
|
* testsuite/gas/i386/evex-no-scale.s: Removed.
|
||||||
|
@ -11127,7 +11127,7 @@ md_show_usage (FILE *stream)
|
|||||||
fprintf (stream, _("\
|
fprintf (stream, _("\
|
||||||
-s ignored\n"));
|
-s ignored\n"));
|
||||||
#endif
|
#endif
|
||||||
#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
|
#if defined BFD64 && (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
|
||||||
|| defined (TE_PE) || defined (TE_PEP))
|
|| defined (TE_PE) || defined (TE_PEP))
|
||||||
fprintf (stream, _("\
|
fprintf (stream, _("\
|
||||||
--32/--64/--x32 generate 32bit/64bit/x32 code\n"));
|
--32/--64/--x32 generate 32bit/64bit/x32 code\n"));
|
||||||
|
@ -33,6 +33,13 @@ proc gas_32_check { } {
|
|||||||
return [regexp "targets:.*i386" [lindex $status 1]];
|
return [regexp "targets:.*i386" [lindex $status 1]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc gas_bfd64_check { } {
|
||||||
|
global AS
|
||||||
|
|
||||||
|
set status [gas_host_run "$AS --help" ""]
|
||||||
|
return [regexp "32bit/64bit/x32" [lindex $status 1]];
|
||||||
|
}
|
||||||
|
|
||||||
if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] then {
|
if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] then {
|
||||||
|
|
||||||
global ASFLAGS
|
global ASFLAGS
|
||||||
@ -534,7 +541,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
|
|||||||
run_dump_test "intel-regs"
|
run_dump_test "intel-regs"
|
||||||
run_dump_test "mixed-mode-reloc32"
|
run_dump_test "mixed-mode-reloc32"
|
||||||
run_dump_test "code64"
|
run_dump_test "code64"
|
||||||
} else {
|
} elseif { ![gas_bfd64_check] } {
|
||||||
run_list_test "code64-inval" "-I${srcdir}/$subdir -al"
|
run_list_test "code64-inval" "-I${srcdir}/$subdir -al"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user