[LLVMbugs] [Bug 19837] New: Global named registers support for pointer types
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 23 05:27:15 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19837
Bug ID: 19837
Summary: Global named registers support for pointer types
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: renato.golin at linaro.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Pointer types are supposed to fit on the architecture registers, so it should
be reasonably safe to assume they're safe for named registers. The code below
asserts on Clang (Bad register type):
struct p4_Thread {
struct {
int len
} word
};
register struct p4_Thread *p4TH asm("%r15");
fn1() {
(*p4TH).word.len;
}
Not only we could add support for pointer types, but we *must* not assert on
bad register types. We should have an error on SemaDecl before it gets to
CGExpr, by checking the type of the register variable and emitting a proper
error.
Once this is accepted by Clang, it will fail on LLVM, since "%r15" is not in
the list of registers accepted. But that's a separate problem.
--
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/20140523/b974da35/attachment.html>
More information about the llvm-bugs
mailing list