[LLVMbugs] [Bug 4176] New: llvm-gcc regparm uses incorrect calling convention with structures

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu May 7 10:06:25 PDT 2009


           Summary: llvm-gcc regparm uses incorrect calling convention with
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu

struct a {unsigned char a,b,c;};
__attribute((regparm(1))) int a(struct a x) { return x.a+x.b+x.c; }
struct c {unsigned x,y;};
__attribute((regparm(2))) int d(struct c x) { return x.x+x.y; }
struct h {int a:5,b:5,c:5;};
__attribute((regparm(3))) int h(struct h x) { return x.a+x.b+x.c; }

llvm-gcc passes all of the above in memory instead of registers, which is not
compatible with gcc.  See bug 3782 comment 2 for more related testcases.

These are manufactured testcases, so I'm not sure they matter much, but I
figured I should file it for completeness.

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