Closed
Description
These intrinsics return a U64x2 instead of i128 / u128 because of ABI requirements.
The tests will have to modified somehow to test these. I tried a transmute:
#[test]
fn divti3() {
for &((a, b), c) in TEST_CASES {
let c_: i128 = unsafe { mem::transmute(__divti3(a, b)) };
assert_eq!(((a, b), c), ((a, b), c_));
}
}
but apparently it didn't work:
running 1 test
test divti3 ... FAILED
failures:
---- divti3 stdout ----
thread 'divti3' panicked at 'assertion failed: `(left == right)` (left: `((-91225923628555883033450043276019451624, -99173197121162634899222824496910041088), -124760295158389846421118573101029785600)`, right: `((-91225923628555883033450043276019451624, -99173197121162634899222824496910041088), 0)`)', C:\projects\compiler-builtins\target\x86_64-pc-windows-msvc\debug\build\compiler_builtins-89dacbcd722cfc78\out/divti3.rs:10050
So maybe we should test for equality using the U64x2 type without going back to i128 / u128.
For #155 I'm going to ignore these tests on Windows which is what we are already doing.
cc @est31
Metadata
Metadata
Assignees
Labels
No labels