Stream: general

Topic: f64 to f32 (+ vice-versa)


view this post on Zulip Robin Lindner (Jul 25 2022 at 19:29):

How can I convert using FuncInstBuilder a Value of F64 to F32?

I want to emit CVTSD2SS on x86_64 for ex.

view this post on Zulip Afonso Bordado (Jul 25 2022 at 19:30):

fdemote should be what you need.

Not sure exactly what instruction it uses, but I can check.

view this post on Zulip Afonso Bordado (Jul 25 2022 at 19:31):

Yeah, it uses CVTSD2SS

view this post on Zulip Robin Lindner (Jul 26 2022 at 16:56):

Thank you very much :D


Last updated: Dec 23 2024 at 12:05 UTC