> /usr/local/gcc43/bin/gcc -v Using built-in specs. Target: i386-apple-darwin9.2.0 Configured with: ../gcc/configure --prefix=/usr/local/gcc43 --enable-threads=posix --with-arch=core2 --with-tune=core2 --with-gmp=/sw --with-mpfr=/sw --disable-nls --disable-bootstrap --enable-checking=yes,rtl CFLAGS=-g LDFLAGS=/usr/lib/libiconv.dylib --enable-languages=c,c++,objc,obj-c++ Thread model: posix gcc version 4.4.0 20080219 (experimental) (GCC) > /usr/local/gcc43/bin/gcc -Os -fno-PIC -S u64mul.c -fomit-frame-pointer
gcc generates: _mul32: pushl %ebx xorl %edx, %edx subl $8, %esp movl _b, %eax movl _a, %ecx movl _a+4, %ebx imull %edx, %ecx imull %eax, %ebx mull _a addl %ebx, %ecx leal (%ecx,%edx), %edx popl %ecx popl %ebx popl %ebx ret and somehow leaves all the stuff with edx in. 4.1.3 generates: mul32: movl _b, %eax movl _a+4, %ecx imull %eax, %ecx mull _a addl %edx, %ecx movl %ecx, %edx ret They both generate bad code for mul16. -- Summary: [4.3 regression] multiply with 0 generated for 64*32->64 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: astrange at ithinksw dot com GCC build triplet: i386-apple-darwin9.2.0 GCC host triplet: i386-apple-darwin9.2.0 GCC target triplet: i386-apple-darwin9.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35281