[Bug target/95750] [x86] Use dummy atomic insn instead of mfence in __atomic_thread_fence(seq_cst)
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 19 09:14:01 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95750
--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
Actually, x86_64 (at least my Fedora 32) does not like operations on stack:
Starting program: /sdd/uros/git/gcc/gcc/testsuite/gcc.dg/atomic/a.out
Program received signal SIGSEGV, Segmentation fault.
0x000000000040110a in main ()
(gdb) disass
Dump of assembler code for function main:
0x0000000000401106 <+0>: push %rbp
0x0000000000401107 <+1>: mov %rsp,%rbp
=> 0x000000000040110a <+4>: lock orq $0x0,(%esp)
0x0000000000401111 <+11>: mov $0x0,%eax
0x0000000000401116 <+16>: pop %rbp
0x0000000000401117 <+17>: retq
End of assembler dump.
I didn't investigate further, but 32bit executable works OK.
More information about the Gcc-bugs
mailing list