Skip to content

Commit

Permalink
Write return value for ptr_mask intrinsic (#1536)
Browse files Browse the repository at this point in the history
This was forgotten. Without it, ptr_mask just always returns null.
  • Loading branch information
Noratrieb authored Sep 22, 2024
1 parent 753271c commit f5686e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,11 @@ fn codegen_regular_intrinsic_call<'tcx>(

sym::ptr_mask => {
intrinsic_args!(fx, args => (ptr, mask); intrinsic);
let ptr_layout = ptr.layout();
let ptr = ptr.load_scalar(fx);
let mask = mask.load_scalar(fx);
fx.bcx.ins().band(ptr, mask);
let res = fx.bcx.ins().band(ptr, mask);
ret.write_cvalue(fx, CValue::by_val(res, ptr_layout));
}

sym::write_bytes | sym::volatile_set_memory => {
Expand Down

0 comments on commit f5686e3

Please sign in to comment.