aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-12-21 09:31:04 +0100
committerJan Beulich <jbeulich@suse.com>2021-12-21 09:31:04 +0100
commit47f4115a1b17f0918a484b935ffd0adcee1555a5 (patch)
tree325d2d614a9afefdddffd8d6e83cbe31c38d460c /gas/config
parentca988435c6138887721d705931abdecd4044f934 (diff)
downloadgdb-47f4115a1b17f0918a484b935ffd0adcee1555a5.zip
gdb-47f4115a1b17f0918a484b935ffd0adcee1555a5.tar.gz
gdb-47f4115a1b17f0918a484b935ffd0adcee1555a5.tar.bz2
x86: -mfence-as-lock-add=yes doesn't work for 16-bit mode
Rather than trying to fix this (which would require making an assumption on the upper half of %esp being zero), simply issue an error. While at it, since the generated code is in conflict with -momit-lock-prefix=yes, issue an error in that case as well.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 9674ec4..dd12a0e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -9632,7 +9632,12 @@ output_insn (void)
{
/* Encode lfence, mfence, and sfence as
f0 83 04 24 00 lock addl $0x0, (%{re}sp). */
- if (now_seg != absolute_section)
+ if (flag_code == CODE_16BIT)
+ as_bad (_("Cannot convert `%s' in 16-bit mode"), i.tm.name);
+ else if (omit_lock_prefix)
+ as_bad (_("Cannot convert `%s' with `-momit-lock-prefix=yes' in effect"),
+ i.tm.name);
+ else if (now_seg != absolute_section)
{
offsetT val = 0x240483f0ULL;