diff options
| author | Damien George | 2014-03-08 15:24:39 +0000 |
|---|---|---|
| committer | Damien George | 2014-03-08 15:24:39 +0000 |
| commit | 0c36da0b59bd3d5aeb6f7bd7f75913695a1dd366 (patch) | |
| tree | eb1d8e50037139646f935df99da56764fcafb4f1 /stm/main.c | |
| parent | 8fd7d7e102372a3fe067030aa0f2049f744b1567 (diff) | |
Implement ROMable modules. Add math module.
mp_module_obj_t can now be put in ROM.
Configuration of float type is now similar to longint: can now choose
none, float or double as the implementation.
math module has basic math functions. For STM port, these are not yet
implemented (they are just stub functions).
Diffstat (limited to 'stm/main.c')
| -rw-r--r-- | stm/main.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/stm/main.c b/stm/main.c index e5f5d4e76..bab8933b1 100644 --- a/stm/main.c +++ b/stm/main.c @@ -666,28 +666,3 @@ soft_reset: first_soft_reset = false; goto soft_reset; } - -// these 2 functions seem to actually work... no idea why -// replacing with libgcc does not work (probably due to wrong calling conventions) -double __aeabi_f2d(float x) { - // TODO - return 0.0; -} - -float __aeabi_d2f(double x) { - // TODO - return 0.0; -} - -double sqrt(double x) { - // TODO - return 0.0; -} - -machine_float_t machine_sqrt(machine_float_t x) { - asm volatile ( - "vsqrt.f32 %[r], %[x]\n" - : [r] "=t" (x) - : [x] "t" (x)); - return x; -} |
