Using -masm=intel and -mavx together with something that uses a 256-bit vector causes an internal error: $ gcc arst.c -mavx -masm=intel arst.c: In function ‘foo’: arst.c:2: internal compiler error: in print_operand, at config/i386/i386.c:11324 $ cat arst.c typedef unsigned long vec __attribute__((vector_size(32))); void foo(vec a) {} $ gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic Thread model: posix gcc version 4.4.2 (GCC)
--- gcc/config/i386/i386.c 2009-11-24 09:59:29.000000000 +0100 +++ gcc/config/i386/i386.c 2009-11-24 19:03:24.871058078 +0100 @@ -11849,6 +11849,7 @@ print_operand (FILE *file, rtx x, int co else size = "XMMWORD"; break; + case 32: size = "YMMWORD"; break; default: gcc_unreachable (); } should fix this. Will test it soon.
Subject: Bug 42165 Author: jakub Date: Wed Nov 25 20:20:40 2009 New Revision: 154652 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154652 Log: PR target/42165 * config/i386/i386.c (print_operand): For 32-byte memory use YMMWORD in -masm=intel mode. Use TBYTE instead of XWORD. * config/i386/i386.md (crc32modesuffix): Expand to nothing in -masm=intel mode. (sse4_2_crc32di): Print just crc32 instead of crc32q in -masm=intel mode. * config/i386/mmx.md (*mmx_pinsrw): Print correct size of memory operand in -masm=intel mode. * config/i386/sse.md (*avx_pinsr<ssevecsize>, *sse4_1_pinsrb, *sse2_pinsrw): Likewise. (sse_cvtss2siq, sse_cvtss2siq_2, sse_cvttss2siq): Don't print q suffix in -masm=intel mode. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/config/i386/i386.md trunk/gcc/config/i386/mmx.md trunk/gcc/config/i386/sse.md
Subject: Bug 42165 Author: jakub Date: Wed Nov 25 20:54:12 2009 New Revision: 154655 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154655 Log: PR target/42165 * config/i386/i386.c (print_operand): For 32-byte memory use YMMWORD in -masm=intel mode. Use TBYTE instead of XWORD. * config/i386/i386.md (crc32modesuffix): Expand to nothing in -masm=intel mode. (sse4_2_crc32di): Print just crc32 instead of crc32q in -masm=intel mode. * config/i386/mmx.md (*mmx_pinsrw): Print correct size of memory operand in -masm=intel mode. * config/i386/sse.md (*avx_pinsr<ssevecsize>, *sse4_1_pinsrb, *sse2_pinsrw): Likewise. (sse_cvtss2siq, sse_cvtss2siq_2, sse_cvttss2siq): Don't print q suffix in -masm=intel mode. Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/config/i386/i386.c branches/gcc-4_4-branch/gcc/config/i386/i386.md branches/gcc-4_4-branch/gcc/config/i386/mmx.md branches/gcc-4_4-branch/gcc/config/i386/sse.md
Fixed for 4.4/4.5.