[LLVMbugs] [Bug 3501] clang x86-64 ABI bug with bit-fields
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Feb 16 19:04:54 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3501
Daniel Dunbar <daniel at zuster.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Daniel Dunbar <daniel at zuster.org> 2009-02-16 21:04:53 ---
Implemented here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090216/012512.html
--
ddunbar at ozzy:CodeGen$ cat x.c
struct s0 {int a : 5, b : 5;};
unsigned a(struct s0 x) { return x.a; }
ddunbar at ozzy:CodeGen$ gcc -O3 -fomit-frame-pointer -m64 -S -o - x.c | head -10
.text
.align 4,0x90
.globl _a
_a:
LFB2:
sall $3, %edi
sarb $3, %dil
movsbl %dil,%eax
ret
LFE2:
ddunbar at ozzy:CodeGen$ xcc -O3 -fomit-frame-pointer -m64 -S -o - x.c | head -10
.text
.align 4,0x90
.globl _a
_a:
shll $27, %edi
movl %edi, %eax
sarl $27, %eax
ret
--
Not sure why you regard this as a tricky case, things like
--
typedef struct {
float a;
int b : 3;
int c : 3;
int d : 31;
} T;
--
are much nastier from a classification point of view.
--
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