[LLVMbugs] [Bug 3967] New: llvm-gcc handles regparm incorrectly

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Apr 9 21:00:54 PDT 2009


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

           Summary: llvm-gcc handles regparm incorrectly
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: haohui.mai at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2813)
 --> (http://llvm.org/bugs/attachment.cgi?id=2813)
test case

It seems that llvm-gcc handles regparm incorreclty in the following test case.
It only marks the first parameter of the function ``kobject_uevent'' as inreg
parameter, but it ignores the second one.

in the source code:
  int kobject_uevent(struct kobject *kobj, enum kobject_action action);

in the IR:
  declare i32 @kobject_uevent(%struct.kobject* inreg, i32)


Here is the command line:

llvm-gcc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -Werror-implicit-function-declaration -O2 -m32 -msoft-float
-mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686
-ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse
-mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign 
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(sys)" 
-D"KBUILD_MODNAME=KBUILD_STR(sys)" -emit-llvm -S -o - sys.i

I'm using the trunk of llvm and llvm-gcc, at revision 68722.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list