Skip to content

Commit 336e40e

Browse files
committed
Add cranelift implementation for intrinsic
1 parent ec7bdeb commit 336e40e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • compiler/rustc_codegen_cranelift/src/intrinsics

compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,12 @@ fn codegen_regular_intrinsic_call<'tcx>(
15291529
fx.bcx.set_cold_block(fx.bcx.current_block().unwrap());
15301530
}
15311531

1532+
sym::return_address => {
1533+
let val = fx.bcx.ins().get_return_address(fx.pointer_type);
1534+
let val = CValue::by_val(val, fx.layout_of(fx.tcx.types.f32));
1535+
ret.write_cvalue(fx, val);
1536+
}
1537+
15321538
// Unimplemented intrinsics must have a fallback body. The fallback body is obtained
15331539
// by converting the `InstanceKind::Intrinsic` to an `InstanceKind::Item`.
15341540
_ => {

0 commit comments

Comments
 (0)