Hello!
Stupid question, how do i make a powf intrinsic with cranelift_codegen? i cannot find it in InstrBuilder, i saw that rustc_codegen_cranelift does some easy_call stuff with powf but im not really sure how i should do it lol
You have to use declare_function with powf as name. This gives a FuncId that you can pass to declare_function_in_function to get a FuncRef that you can call using the call instruction. powf is a regular function defined in libm.
@Riccardo D'Ambrosio
I see, thanks! :smile:
Last updated: Dec 06 2025 at 06:05 UTC