search for: setalignstack

Displaying 4 results from an estimated 4 matches for "setalignstack".

2017 Oct 23
3
maximum value for alignstack function attribute?
I have this test case in my frontend, which is triggering an assert in llvm master branch: fn fnWithAlignedStack() -> i32 { @setAlignStack(1024); return 1234; } It sets alignstack=1024 in the function attributes (see http://llvm.org/docs/LangRef.html#function-attributes). It's tripping an assert: llvm/lib/IR/Attributes.cpp:134: static llvm::Attribute llvm::Attribute::getWithStackAlignment(llvm::LLVMContext&, uint64_t): A...
2018 Apr 26
2
windows ABI problem with i128?
...ABI than LLVM will use when you do i128 division. For example, here is my test case (in zig code): ================================================================= pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: c_uint) noreturn; export fn WinMainCRTStartup() noreturn { @setAlignStack(16); @setRuntimeSafety(false); var a: u128 = 152313999999999991610955792383; var b: u128 = 10000000000000000000; var c = a / b; // this generates a call to __udivti3 if (c != b) { @breakpoint(); } ExitProcess(0); } export fn __udivti3(a: u128, b: u128) u128 {...
2018 Apr 26
0
windows ABI problem with i128?
...> do i128 division. For example, here is my test case (in zig code): > ================================================================= > > pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: c_uint) noreturn; > > export fn WinMainCRTStartup() noreturn { > @setAlignStack(16); > @setRuntimeSafety(false); > > var a: u128 = 152313999999999991610955792383; > var b: u128 = 10000000000000000000; > var c = a / b; // this generates a call to __udivti3 > > if (c != b) { > @breakpoint(); > } > ExitProcess(0);...
2018 Apr 26
1
windows ABI problem with i128?
...here is my test case (in zig code): > > ================================================================= > > > > pub extern "kernel32" stdcallcc fn ExitProcess(exit_code: c_uint) > noreturn; > > > > export fn WinMainCRTStartup() noreturn { > > @setAlignStack(16); > > @setRuntimeSafety(false); > > > > var a: u128 = 152313999999999991610955792383; > > var b: u128 = 10000000000000000000; > > var c = a / b; // this generates a call to __udivti3 > > > > if (c != b) { > > @breakpoint...