Fix cttz{,_nonzero} intrinsics
This commit is contained in:
parent
5721542164
commit
26289edf1a
@ -1,3 +1,5 @@
|
|||||||
|
#![feature(core_intrinsics)]
|
||||||
|
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
@ -7,5 +9,7 @@ fn main() {
|
|||||||
|
|
||||||
writeln!(stderr, "some {} text", "<unknown>").unwrap();
|
writeln!(stderr, "some {} text", "<unknown>").unwrap();
|
||||||
|
|
||||||
std::process::Command::new("true").env("c", "d").spawn();
|
let _ = std::process::Command::new("true").env("c", "d").spawn();
|
||||||
|
|
||||||
|
println!("cargo:rustc-link-lib=z");
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
|
|||||||
ret.write_cvalue(fx, res);
|
ret.write_cvalue(fx, res);
|
||||||
};
|
};
|
||||||
cttz | cttz_nonzero, <T> (v arg) {
|
cttz | cttz_nonzero, <T> (v arg) {
|
||||||
let res = CValue::ByVal(fx.bcx.ins().clz(arg), fx.layout_of(T));
|
let res = CValue::ByVal(fx.bcx.ins().ctz(arg), fx.layout_of(T));
|
||||||
ret.write_cvalue(fx, res);
|
ret.write_cvalue(fx, res);
|
||||||
};
|
};
|
||||||
ctpop, <T> (v arg) {
|
ctpop, <T> (v arg) {
|
||||||
|
Loading…
Reference in New Issue
Block a user