Allow one of float/double to have 'none' impl but not the other - previously caused a link error

This commit is contained in:
graham sanderson 2021-06-17 08:15:07 -05:00 committed by Luke Wren
parent f4ab723eb5
commit e02c6b327d
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,8 @@ static __attribute__((noreturn)) void missing_double_func_shim(void) {
#endif #endif
extern void double_table_shim_on_use_helper(void); extern void double_table_shim_on_use_helper(void);
void __attribute__((weak)) *sf_clz_func;
void __aeabi_double_init(void) { void __aeabi_double_init(void) {
int rom_version = rp2040_rom_version(); int rom_version = rp2040_rom_version();
#if PICO_DOUBLE_SUPPORT_ROM_V1 #if PICO_DOUBLE_SUPPORT_ROM_V1
@ -63,4 +65,6 @@ void __aeabi_double_init(void) {
// we use the unused entry for SINCOS // we use the unused entry for SINCOS
sd_table[SF_TABLE_V3_FSINCOS / 4] = (uintptr_t) double_table_shim_on_use_helper; sd_table[SF_TABLE_V3_FSINCOS / 4] = (uintptr_t) double_table_shim_on_use_helper;
} }
sf_clz_func = rom_func_lookup(rom_table_code('L', '3'));
} }

View File

@ -11,7 +11,7 @@
// NOTE THIS FUNCTION TABLE IS NOT PUBLIC OR NECESSARILY COMPLETE... // NOTE THIS FUNCTION TABLE IS NOT PUBLIC OR NECESSARILY COMPLETE...
// IT IS ***NOT*** SAFE TO CALL THESE FUNCTION POINTERS FROM ARBITRARY CODE // IT IS ***NOT*** SAFE TO CALL THESE FUNCTION POINTERS FROM ARBITRARY CODE
uint32_t sf_table[SF_TABLE_V2_SIZE / 2]; uint32_t sf_table[SF_TABLE_V2_SIZE / 2];
void *sf_clz_func; void __attribute__((weak)) *sf_clz_func;
#if !PICO_FLOAT_SUPPORT_ROM_V1 #if !PICO_FLOAT_SUPPORT_ROM_V1
static __attribute__((noreturn)) void missing_float_func_shim(void) { static __attribute__((noreturn)) void missing_float_func_shim(void) {