aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-06-15 08:01:12 +0200
committerJan Beulich <jbeulich@suse.com>2021-06-15 08:01:12 +0200
commitb00af7c8c615891f24a21d79a5bea35ef82bf252 (patch)
tree5dd5a800ca6c88e086f64c8cc508323d2c89d920 /gas
parent2f2be86bbb8d26f780183e45b169748ef625f03d (diff)
downloadgdb-b00af7c8c615891f24a21d79a5bea35ef82bf252.zip
gdb-b00af7c8c615891f24a21d79a5bea35ef82bf252.tar.gz
gdb-b00af7c8c615891f24a21d79a5bea35ef82bf252.tar.bz2
x86: bring "gas --help" output for --32 etc in sync with reality
The testsuite uses the output to determine whether BFD64 is in effect. --x32 is supported for ELF only; don't advertise it for PE/COFF. --64 is also supported for Mach-O; advertise it. Adjust the testsuite's BFD64 check accordingly. Also replace "code" by "object", since it's the object format that the options primarily control. It's also _initial_ code bitness, but this can be changed by directives.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-i386.c10
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
3 files changed, 15 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d01ba23..be9882a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2021-06-15 Jan Beulich <jbeulich@suse.com>
+ * config/tc-i386.c (md_show_usage): Split ELF and PE/COFF parts
+ of object format controlling option. Add Mach-O to the latter.
+ * testsuite/gas/i386/i386.exp (gas_bfd64_check): Adjust
+ accordingly.
+
+2021-06-15 Jan Beulich <jbeulich@suse.com>
+
* config/tc-i386.c (disp16, disp32, disp32s): Delete.
(optimize_disp, i386_finalize_displacement): Use
operand_type_and_not.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 18187d7..168f7d5 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -13719,10 +13719,14 @@ md_show_usage (FILE *stream)
fprintf (stream, _("\
-s ignored\n"));
#endif
-#if defined BFD64 && (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) \
- || defined (TE_PE) || defined (TE_PEP))
+#ifdef BFD64
+# if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ fprintf (stream, _("\
+ --32/--64/--x32 generate 32bit/64bit/x32 object\n"));
+# elif defined (TE_PE) || defined (TE_PEP) || defined (OBJ_MACH_O)
fprintf (stream, _("\
- --32/--64/--x32 generate 32bit/64bit/x32 code\n"));
+ --32/--64 generate 32bit/64bit object\n"));
+# endif
#endif
#ifdef SVR4_COMMENT_CHARS
fprintf (stream, _("\
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 8f41778..1e0a363 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -41,7 +41,7 @@ proc gas_bfd64_check { } {
global AS
set status [gas_host_run "$AS --help" ""]
- return [regexp "32bit/64bit/x32" [lindex $status 1]];
+ return [regexp "32bit/64bit" [lindex $status 1]];
}
if [gas_32_check] then {