Stream: cranelift

Topic: ✔ converting i8 to i64


view this post on Zulip JT (May 01 2023 at 04:20):

Hi all - I'm currently trying to return the result of a comparison and I need to ensure that it's i64 (which is what the codegen'd function's return type is). I'm looking around to see how to convert an i8 to an i64 but haven't found anything.

Can someone point me in the direction I should be looking? Cheers

view this post on Zulip bjorn3 (May 01 2023 at 06:41):

You can use the uextend or sextend instructions depending on if it is an unsigned or signed integer.

view this post on Zulip Notification Bot (May 01 2023 at 09:55):

JT has marked this topic as resolved.


Last updated: Dec 23 2024 at 12:05 UTC