9815 – atomicity.h - fails to compile with -O3 -masm=intel (original) (raw)
| C:\Temp/cceyaaaa.s: Assembler messages: C:\Temp/cceyaaaa.s:59: Error: no such instruction: `xaddl ebx,DWORD PTR [eax-4]' C:\Temp/cceyaaaa.s:199: Error: no such instructio n: `addl eax,DWORD PTR [ecx]' Release: gcc-3.2.2 (mingw special 20030208-1) Environment: x86, win32 (windows 2000 pro) How-To-Repeat: a.cpp: #include int main(int argc, char *argv[]) { std::string a="a"; } Command line: gcc -O3 a.cpp -lstdc++ -masm=intel Comment 1 kfoltman 2003-02-23 09:16:01 UTC Fix: Use different versions of atomicity.h for intel and AT&T syntax. It will probably need to make the compiler issue a #define when -masm=intel is used. Comment 2 kfoltman 2003-02-23 10:51:14 UTC From: "Krzysztof Foltman" <kfoltman@onet.pl> To: <gcc-gnats@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, "Krzysztof Foltman" <kfoltman@onet.pl> Cc: Subject: Re: libstdc++/9815: atomicity.h - fails to compile with -O3 -masm=intel Date: Sun, 23 Feb 2003 10:51:14 +0100 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=g cc&pr=9815 Also occurs in Debian 3.2.2: Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.2/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc, ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --wi th-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zl ib --enable-nls --without-included-gettext --enable-__cxa_atexit --enabl e-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux Thread model: posix gcc version 3.2.2 20030109 (Debian prerelease) Krzysztof Comment 3 Drea Pinski 2003-05-24 20:39:36 UTC still fails with mainline (20030524): /tmp/cc0oL5Sh.s: Assembler messages: /tmp/cc0oL5Sh.s:39: Error: no such instruction: `xaddl %eax,DWORD PTR [%edx-4]' Comment 4 Drea Pinski 2003-05-24 20:48:57 UTC Created attachment 4067 [details] Patch ChangeLog (no tabs though): libstd++: 2003-05-24 Andrew Pinski <pinskia@physics.uc.edu> config/cpu/i386/atomicity.h (__exchange_and_add): add intel asm case to asm. config/cpu/i486/atomicity.h (__exchange_and_add): Likewise. (__atomic_add): likewise. Comment 5 Benjamin Kosnik 2003-06-02 18:37:51 UTC This patch fixes this, and is now in gcc mainline and gcc-3_3-branch 2003-06-02 Andrew Pinski <pinskia@physics.uc.edu> PR libstdc++/9815 * config/cpu/i386/atomicity.h (__exchange_and_add): add intel asm case to asm. * config/cpu/i486/atomicity.h (__exchange_and_add): Likewise. (__atomic_add): likewise. | | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |