extensions
Steven Massey 4 years ago
commit 673244edd5

@ -16,7 +16,7 @@ MXChip AZ3166 | EMW3166 | Cortex-M4 | 100MHz | 1 MB+2 MB | 25
Arduino Due | AT91SAM3X8E | Cortex-M3 | 84MHz | 512KB | 96KB
Sipeed MAIX | Kendryte K210 | RV64IMAFDC | 400MHz | 16 MB | 8 MB
SiFive HiFive1 | Freedom E310 | RV32IMAC | 320MHz | 16 MB | 16KB
Fomu (soft CPU) | Lattice ICE40UP5K | RV32I | 12MHz | 1 MB | 128KB
Fomu (soft CPU) | Lattice ICE40UP5K | RV32I | 12MHz | 2 MB <sup></sup> | 128KB
## Limited support
@ -35,4 +35,6 @@ Nordic nRF51822 | | Cortex-M0 <sup>⚠️</sup> | 16MH
Wicked Device WildFire | ATmega1284 | 8-bit AVR <sup>⚠️</sup> | 20MHz | 128KB | 16KB
### Legend:
⚠️ This architecture/compiler currently fails to perform TCO (Tail Call Optimization/Elimination), wich leads to sub-optimal interpreter behaviour (intense native stack usage, lower performance). There are plans to improve this in future 🦄.
⚠️ This architecture/compiler currently fails to perform TCO (Tail Call Optimization/Elimination), which leads to sub-optimal interpreter behaviour (intense native stack usage, lower performance). There are plans to improve this in future 🦄.
⁑ Some flash space is used by the bootloader meaning usable space is less.

@ -21,6 +21,8 @@ Native (GCC 7.4.0, 32-bit) 18070.112035 11.1x
Native (GCC 7.4.0, 64-bit) 19144.862795 11.8x
```
**Note:** Here is more info on [how to run CoreMark benchmark](../test/benchmark/coremark).
## Simple recursive Fibonacci calculation test
```log
@ -56,8 +58,8 @@ OpenWRT 3m 20s
----------------------------------------------------------------------------------------------------
Maix (K210) rv64imafc @ 400MHz 77ms 77ms
ESP8266 LX106 @ 160MHz 308ms 321ms TCO failed, stack used: 9024
ESP32 LX6 @ 240MHz 340ms 350ms TCO failed, stack used: 10600
ESP32-s2 (beta) LX6 @ 240MHz 340ms 351ms TCO failed
ESP32 LX6 @ 240MHz 297ms 314ms TCO failed, stack used: 10600
ESP32-s2 (beta) LX6 @ 240MHz 297ms 314ms TCO failed
Particle Photon Arm M3 @ 120MHz 536ms 562ms
MXChip AZ3166 Arm M4 @ 100MHz ms ms
WM W600 Arm M3 @ 80MHz 698ms 782ms TCO enabled, stack used: 1325

@ -23,4 +23,4 @@ else()
target_link_libraries(${COMPONENT_TARGET} PRIVATE m3)
endif()
target_compile_options(m3 PUBLIC -DM3_IN_IRAM -DESP32 -Dd_m3LogOutput=false)
target_compile_options(m3 PUBLIC -DM3_IN_IRAM -DESP32 -Dd_m3LogOutput=false -O3 -freorder-blocks)

@ -4,5 +4,5 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=32768
# Disable task watchdog
CONFIG_ESP_TASK_WDT=n
# Increse CPU frequency
# Increase CPU frequency
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y

@ -1908,10 +1908,7 @@ M3Result Compile_BlockStatements (IM3Compilation o)
if (not compiler)
compiler = Compile_Operator;
if (compiler)
result = (* compiler) (o, opcode);
else
result = m3Err_noCompiler;
result = (* compiler) (o, opcode);
o->previousOpcode = opcode; // m3logif (stack, dump_type_stack (o))

@ -588,9 +588,9 @@ M3Result m3_CallWithArgs (IM3Function i_function, uint32_t i_argc, const char
case c_m3Type_f32: *(f32*)(s) = atof(str); break;
case c_m3Type_f64: *(f64*)(s) = atof(str); break;
#else
case c_m3Type_i32: *(u32*)(s) = strtoul(str, NULL, 10); break;
case c_m3Type_i64: *(u64*)(s) = strtoull(str, NULL, 10); break;
case c_m3Type_i32:
case c_m3Type_f32: *(u32*)(s) = strtoul(str, NULL, 10); break;
case c_m3Type_i64:
case c_m3Type_f64: *(u64*)(s) = strtoull(str, NULL, 10); break;
#endif
default: _throw("unknown argument type");

@ -81,7 +81,7 @@ int __builtin_clzll(uint64_t value) {
// TODO: not sure why, signbit is actually defined in math.h
#if defined(ESP8266) || defined(ESP32)
#if (defined(ESP8266) || defined(ESP32)) && !defined(signbit)
#define signbit(__x) \
((sizeof(__x) == sizeof(float)) ? __signbitf(__x) : __signbitd(__x))
#endif

Loading…
Cancel
Save