http://llvm.org/bugs/show_bug.cgi?id=20292
Bug ID: 20292
Summary: x86_stdcallcc: Assertion hit when passing more than
2^16 bytes on the stack
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Generating code for the following piece of IR currently asserts as
X86TargetLowering::LowerReturn tries to fit the number of bytes to pop on
function exit into a 16 bit constant:
---
target datalayout =
"e-p:32:32:32-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f16:16:16-f32:32:32-f64:32:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i386-unknown-linux-gnu"
%bar = type { [16385 x i32] }
define x86_stdcallcc void @foo(%bar* byval %s_arg) {
ret void
}
---
Of course, passing such a large object on the stack is rather nonsensical, but
I think this is somewhat problematic as IR that passes the validator/… silently
leads to wrong code being generated ("ret $4") when LLVM is built without
assertions.
Is it worth supporting this, or should there simply be a fatal error in
X86TargetLowering::LowerReturn when encountering such large sizes?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs