Hi Dan, I've committed this: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of- Mon-20070702/051079.html
as a workaround. Please figure out a proper fix. Thanks! Evan On Jul 5, 2007, at 5:52 PM, Evan Cheng wrote: > Hi Dan, > > Ok, this is the problem: > > li r4, 124 > li r30, 0 > mr r2, r30 > mr r29, r30 > LBB1_1: ;bb > li r3, lo16(LCPI1_0) > rlwinm r5, r4, 3, 29, 29 > addis r3, r3, ha16(LCPI1_0) > stw r4, 64(r1) > stw r30, 68(r1) > > The last two instructions are storing the wrong values. They should be > stw r30, 64(r1) > stw r4, 68(r1) > > Please take a look at this asap. Thanks. > > Evan > > On Jul 5, 2007, at 4:57 PM, Evan Cheng wrote: > >> Here is a much simpler test case: >> >> SingleSource/UnitTests/2005-05-12-Int64ToFP.c: >> >> I am still trying to figure out what exactly is wrong. >> >> Evan >> >> On Jul 5, 2007, at 4:33 PM, Bill Wendling wrote: >> >>> On 7/5/07, Evan Cheng <[EMAIL PROTECTED]> wrote: >>>> >>>> On Jul 5, 2007, at 7:49 AM, Dan Gohman wrote: >>>> >>>>> Hi Evan, >>>>> >>>>> I'm currently testing the attached patch, which seems to fix the >>>>> problems for PPC. It extends getCopyToParts and getCopyFromParts >>>>> to have an extra parameter to indicate when endian-swapping is >>>>> needed. I don't have access to a PPC test environment; I've >>>>> included >>>>> a few trivial regression tests in this patch; I'll do some more >>>>> soon. >>>> >>>> Thanks. I'll do some testing. >>>> >>>>> >>>>> Copying to virtual registers is always done in little-endian >>>>> order, >>>>> while copying to physical registers, arguments, or return values, >>>>> is done in target-endian order. I wonder if it would make sense to >>>>> change to using target-endian order for virtual registers as well? >>>> >>>> I don't think it matters, does it? If it makes the code cleaner >>>> then >>>> please do so. >>>> >>> FWIW, the PPC bootstrap is still failing with this patch. It's doing >>> so at an earlier stage now. Here's part of the log file that shows >>> the >>> failure: >>> >>> # When building multilibbed target libraries, all the required >>> # When building multilibbed target libraries, all the required >>> # libraries are expected to exist in the multilib directory. >>> MLIBS=` ./xgcc -B./ >>> -B/usr/local/llvm-gcc-install/powerpc-apple-darwin9/bin/ -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/include -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/sys-include >>> -L/Volumes/SandBox/Clean/llvm-1040-01.roots/llvm-1040-01~obj/obj- >>> powerpc-powerpc/gcc/../ld >>> --print-multi-lib \ >>> | sed -e 's/;.*$//' -e '/^\.$/d'` ; \ >>> for mlib in $MLIBS ; do \ >>> rm -f ${mlib}/libgcc_s.10.4.dylib || exit 1 ; \ >>> ln -s ../libgcc_s.10.4.dylib ${mlib}/libgcc_s.10.4.dylib || exit >>> 1 ; \ >>> done >>> # libraries are expected to exist in the multilib directory. >>> MLIBS=` ./xgcc -B./ >>> -B/usr/local/llvm-gcc-install/powerpc-apple-darwin9/bin/ -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/include -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/sys-include >>> -L/Volumes/SandBox/Clean/llvm-1040-01.roots/llvm-1040-01~obj/obj- >>> powerpc-powerpc/gcc/../ld >>> --print-multi-lib \ >>> | sed -e 's/;.*$//' -e '/^\.$/d'` ; \ >>> for mlib in $MLIBS ; do \ >>> rm -f ${mlib}/libgcc_s.10.5.dylib || exit 1 ; \ >>> ln -s ../libgcc_s.10.5.dylib ${mlib}/libgcc_s.10.5.dylib || exit >>> 1 ; \ >>> done >>> MLIBS=` ./xgcc -B./ >>> -B/usr/local/llvm-gcc-install/powerpc-apple-darwin9/bin/ -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/include -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/sys-include >>> -L/Volumes/SandBox/Clean/llvm-1040-01.roots/llvm-1040-01~obj/obj- >>> powerpc-powerpc/gcc/../ld >>> --print-multi-lib \ >>> | sed -e 's/;.*$//' -e '/^\.$/d'` ; \ >>> for mlib in '' $MLIBS ; do \ >>> strip -o libgcc_s.10.5.dylib_T${mlib} \ >>> -s /Volumes/SandBox/Clean/llvm-1040-01.roots/llvm-1040-01~obj/ >>> src/gcc/config/rs6000/darwin-libgcc.10.5.ver >>> -c -u \ >>> ./${mlib}/libgcc_s.1.dylib.tmp || exit 1 ; \ >>> done >>> MLIBS=` ./xgcc -B./ >>> -B/usr/local/llvm-gcc-install/powerpc-apple-darwin9/bin/ -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/include -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/sys-include >>> -L/Volumes/SandBox/Clean/llvm-1040-01.roots/llvm-1040-01~obj/obj- >>> powerpc-powerpc/gcc/../ld >>> --print-multi-lib \ >>> | sed -e 's/;.*$//' -e '/^\.$/d'` ; \ >>> for mlib in '' $MLIBS ; do \ >>> strip -o libgcc_s.10.4.dylib_T${mlib} \ >>> -s /Volumes/SandBox/Clean/llvm-1040-01.roots/llvm-1040-01~obj/ >>> src/gcc/config/rs6000/darwin-libgcc.10.4.ver >>> -c -u \ >>> ./${mlib}/libgcc_s.1.dylib.tmp || exit 1 ; \ >>> done >>> lipo -output libgcc_s.10.4.dylib -create libgcc_s.10.4.dylib_T* >>> lipo -output libgcc_s.10.5.dylib -create libgcc_s.10.5.dylib_T* >>> rm libgcc_s.10.5.dylib_T* >>> rm libgcc_s.10.4.dylib_T* >>> # When building multilibbed target libraries, all the required >>> # libraries are expected to exist in the multilib directory. >>> MLIBS=` ./xgcc -B./ >>> -B/usr/local/llvm-gcc-install/powerpc-apple-darwin9/bin/ -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/include -isystem >>> /usr/local/llvm-gcc-install/powerpc-apple-darwin9/sys-include >>> -L/Volumes/SandBox/Clean/llvm-1040-01.roots/llvm-1040-01~obj/obj- >>> powerpc-powerpc/gcc/../ld >>> --print-multi-lib \ >>> | sed -e 's/;.*$//' -e '/^\.$/d'` ; \ >>> for mlib in '' $MLIBS ; do \ >>> cp ./${mlib}/libgcc_s.1.dylib.tmp \ >>> ./libgcc_s.1.dylib_T_${mlib} || exit 1 ; \ >>> done >>> lipo -output libgcc_s.1.dylib \ >>> -create libgcc_s.1.dylib_T* >>> rm libgcc_s.1.dylib_T* >>> make[3]: *** [libgcc_s.1.dylib] Segmentation fault >>> make[3]: *** Deleting file `libgcc_s.1.dylib' >>> rm cpp.pod gfdl.pod fsf-funding.pod gcov.pod gcc.pod gpl.pod >>> make[2]: *** [stage1_build] Error 2 >>> make[1]: *** [bootstrap] Error 2 >>> + exit 1 >>> make: *** [install] Error 1 >>> >>> -bw >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits@cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits@cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits