Stream: cranelift

Topic: bitcasting r64 types


view this post on Zulip mental (Sep 04 2021 at 11:32):

I just ran into a bit of a snag earlier, my function caused a panic in the lowering machinery when it tried to bitcast an i64 to an r64 (I'm using r64 as an opaque pointer type void * style), changing it to use raw_bitcast avoids the panic but I'm not sure if i'm doing something dangerous. What's the difference between bitcasting i64 -> r64 and raw_bitcasting it?

view this post on Zulip Chris Fallin (Sep 07 2021 at 16:01):

This is a known issue, most likely https://github.com/bytecodealliance/wasmtime/issues/3217

For the below .clif code Cranelift appears to pass unsolvable input to regalloc. This was previously investigated as an issue with regalloc, but after some investigation @cfallin suggested moving i...

view this post on Zulip Chris Fallin (Sep 07 2021 at 16:02):

in theory it should be possible to bitcast but our lowering of reftypes currently works only for what the Wasm frontend does with them, namely pass them around as opaque values


Last updated: Dec 23 2024 at 13:07 UTC