[LLVMbugs] [Bug 15605] New: bad asm emitted for powerpc-darwin8

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 26 14:50:39 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15605

            Bug ID: 15605
           Summary: bad asm emitted for powerpc-darwin8
           Product: libraries
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: fang at csl.cornell.edu
                CC: hfinkel at anl.gov, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I'm now seeing the following errors:

g% /Volumes/Isolde/sources/LLVM-svn/gcc40-cmake-build/bin/clang++  
-DLLVMSupport_EXPORTS -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -fno-common -no-integrated-as -fvisibility-inlines-hidden
-Wnon-virtual-dtor -fno-rtti -gdwarf2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fPIC -I/Users/fang/local/src/LLVM-svn/gcc40-stage2-build/lib/Support
-I/Users/fang/local/src/LLVM-svn/llvm/lib/Support
-I/Users/fang/local/src/LLVM-svn/gcc40-stage2-build/include
-I/Users/fang/local/src/LLVM-svn/llvm/include    -Wall -W -Wno-unused-parameter
-Wwrite-strings -pedantic -Wno-long-long -fno-exceptions -o
CMakeFiles/LLVMSupport.dir/APFloat.cpp.o -c
/Users/fang/local/src/LLVM-svn/llvm/lib/Support/APFloat.cpp -save-temps
clang-3.1: warning: argument unused during compilation: '-gdwarf2'
APFloat.s:20875:Parameter error: r0 not allowed for parameter 2 (code as 0 not
r0)
APFloat.s:21303:Parameter error: r0 not allowed for parameter 2 (code as 0 not
r0)
APFloat.s:21319:Parameter error: r0 not allowed for parameter 2 (code as 0 not
r0)
APFloat.s:21325:Parameter error: r0 not allowed for parameter 2 (code as 0 not
r0)
clang-3.1: error: assembler command failed with exit code 1 (use -v to see
invocation)

example asm:
        .private_extern __ZN4llvm3sys16SwapByteOrder_32Ej
        .globl  __ZN4llvm3sys16SwapByteOrder_32Ej
        .weak_definition        __ZN4llvm3sys16SwapByteOrder_32Ej
        .align  4
__ZN4llvm3sys16SwapByteOrder_32Ej:      ; @_ZN4llvm3sys16SwapByteOrder_32Ej
; BB#0:                                 ; %entry
        stw r3, -8(r1)
        addi r2, r1, -8
        lwbrx r2, r0, r2
        stw r3, -12(r1)                 ; 4-byte Folded Spill
        mr r3, r2
        blr

The system assembler is complaining about the 'lwbrx' line.

another example:
LBB236_1:                               ; %entry
                                        ; =>This Inner Loop Header: Depth=1
        lwz r2, 80(r31)                 ; 4-byte Folded Reload
        lwarx r3, r0, r2
        lwz r4, 88(r31)                 ; 4-byte Folded Reload
        and r5, r3, r4
        lwz r6, 72(r31)                 ; 4-byte Folded Reload
        cmpw cr0, r5, r6
        stw r3, 68(r31)                 ; 4-byte Folded Spill
        stw r5, 64(r31)                 ; 4-byte Folded Spill
        bne cr0, LBB236_3
; BB#2:                                 ; %entry

errors on the 'lwarx' line.

another example:
LBB236_3:                               ; %entry
        lwz r2, 68(r31)                 ; 4-byte Folded Reload
        lwz r3, 80(r31)                 ; 4-byte Folded Reload
        stwcx. r2, r0, r3
LBB236_4:                               ; %entry
        lwz r2, 64(r31)                 ; 4-byte Folded Reload
        lwz r3, 84(r31)                 ; 4-byte Folded Reload
        srw r4, r2, r3
        rlwinm r4, r4, 0, 24, 31
        sync
        cmplwi cr0, r4, 0
        bne cr0, LBB236_10
        b LBB236_5

error points to the 'stwcx' line.

This error did not happen a month ago.

Hal, do you know of any changes that might have affected this?
Would this be easy to fix?  somewhere in PPCDarwinAsmPrinter?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130326/a355bfd7/attachment.html>


More information about the llvm-bugs mailing list