[LLVMbugs] [Bug 12249] New: Invalid endianness
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 12 02:52:59 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12249
Bug #: 12249
Summary: Invalid endianness
Product: clang
Version: 3.0
Platform: All
OS/Version: All
Status: NEW
Severity: release blocker
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: hranac.bz at email.cz
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang doesn't support big endian at all.
== Reproduction ==
The following input program:
struct {
unsigned a: 4;
unsigned b: 4;
} U = {3,5};
int main()
{
return 0;
}
will produce the following .ll file for a 16-bit architecture (regardless of
the endianness):
%struct.anon = type { i8, i8 }
@U = global %struct.anon { i8 53, i8 undef }, align 2
define i16 @main() nounwind {
entry:
%retval = alloca i16, align 2
store i16 0, i16* %retval
ret i16 0
}
==========================
Obviously, this is correct only for little-endian. Big-endian should have the
initialization reversed ( %struct.anon { i8 undef, i8 53 } ).
This matter has been reported at least two years ago already.
--
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