mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-03 18:43:38 +00:00
Implement vtable_size and vtable_align intrinsics for cg_clif
This commit is contained in:
parent
6c9abfa0f3
commit
f8feed7d27
@ -431,6 +431,16 @@ fn codegen_regular_intrinsic_call<'tcx>(
|
||||
ret.write_cvalue(fx, CValue::by_val(align, usize_layout));
|
||||
};
|
||||
|
||||
vtable_size, (v vtable) {
|
||||
let size = crate::vtable::size_of_obj(fx, vtable);
|
||||
ret.write_cvalue(fx, CValue::by_val(size, usize_layout));
|
||||
};
|
||||
|
||||
vtable_align, (v vtable) {
|
||||
let align = crate::vtable::min_align_of_obj(fx, vtable);
|
||||
ret.write_cvalue(fx, CValue::by_val(align, usize_layout));
|
||||
};
|
||||
|
||||
unchecked_add | unchecked_sub | unchecked_mul | unchecked_div | exact_div | unchecked_rem
|
||||
| unchecked_shl | unchecked_shr, (c x, c y) {
|
||||
// FIXME trap on overflow
|
||||
|
Loading…
Reference in New Issue
Block a user