fix: Add (even more) #[avr_skip] for floats

Tale as old as the world - there's an ABI mismatch:
https://github.com/rust-lang/compiler-builtins/pull/527

Fortunately, newest GCCs (from v11, it seems) actually provide most of
those intrinsics (even for f64!), so that's pretty cool.

(the only intrinsics not provided by GCC are `__powisf2` & `__powidf2`,
but our codegen for AVR doesn't emit those anyway.)

Fixes https://github.com/rust-lang/rust/issues/118079.
This commit is contained in:
Patryk Wychowaniec
2023-11-26 16:17:00 +01:00
parent 52959b5800
commit c2c4c8e146
6 changed files with 10 additions and 0 deletions

View File

@@ -185,12 +185,14 @@ where
}
intrinsics! {
#[avr_skip]
#[aapcs_on_arm]
#[arm_aeabi_alias = __aeabi_fmul]
pub extern "C" fn __mulsf3(a: f32, b: f32) -> f32 {
mul(a, b)
}
#[avr_skip]
#[aapcs_on_arm]
#[arm_aeabi_alias = __aeabi_dmul]
pub extern "C" fn __muldf3(a: f64, b: f64) -> f64 {