Displaying 3 results from an estimated 3 matches for "setruntimesafety".
2018 Apr 26
2
windows ABI problem with i128?
...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 {
@setRuntimeSafety(false...
2018 Apr 26
0
windows ABI problem with i128?
...ample, 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 __udi...
2018 Apr 26
1
windows ABI problem with i128?
...):
> > =================================================================
> >
> > 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();
> > }
> > Exi...