Write return value for ptr_mask intrinsic (#1536)

This was forgotten. Without it, ptr_mask just always returns null.
This commit is contained in:
nora 2024-09-22 15:46:44 +02:00 committed by GitHub
parent 753271ce7e
commit f5686e3cc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 => {