This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/44217] GCC emits cmpxchg16b which Sun as cannot handle
- From: "ro at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 11 Jan 2011 13:49:48 +0000
- Subject: [Bug target/44217] GCC emits cmpxchg16b which Sun as cannot handle
- Auto-submitted: auto-generated
- References: <bug-44217-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44217
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.11 13:49:30
Ever Confirmed|0 |1
--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> 2011-01-11 13:49:30 UTC ---
Looking further, there's certainly a compiler problem here. In the assembler
output for ibgomp.c/atomic-2.c, I see
> grep cmpxchg atomic-2.s
lock cmpxchgq %rcx, d(%rip)
lock cmpxchg16b ld(%rip)
The first variant can be assembled correctly by Sun as, while the second
cannot.
It seems that GCC is buggy/inconsistent here: while Sun as knows about
cmpxchg8b,
it normally requires cmpxchg{b,w,l,q}, and definitely cannot handle cmpxchg16b.