Remove an assumption of 64-bit pointer alignment

This commit is contained in:
Brian Carroll 2021-12-07 20:14:22 +00:00
parent 2f4225eec6
commit 0220f7d921

View file

@ -1754,8 +1754,8 @@ fn tag_pointer_set_tag_id<'a, 'ctx, 'env>(
tag_id: u8,
pointer: PointerValue<'ctx>,
) -> PointerValue<'ctx> {
// we only have 3 bits, so can encode only 0..7
debug_assert!(tag_id < 8);
// we only have 3 bits, so can encode only 0..7 (or on 32-bit targets, 2 bits to encode 0..3)
debug_assert!((tag_id as u32) < env.ptr_bytes);
let ptr_int = env.ptr_int();