rust-demo-cortex-m4 icon indicating copy to clipboard operation
rust-demo-cortex-m4 copied to clipboard

hard float: wrong argument type

Open msplr opened this issue 10 years ago • 0 comments

In LM4F_startup.c you should add a C declaration for the function rust_float_test to tell the C compiler what argument type is expected. (something like float rust_float_test(float);)

This prevents GCC from assuming double as the default argument type, leading to the following incorrect function call:

vldr        d0, [pc, #28]    ; 300 <rst_handler+0x68>
bl          34c <rust_float_test>

msplr avatar Sep 02 '15 11:09 msplr