espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.8k stars 749 forks source link

__aeabi_dadd/__aeabi_dsub sizes for nRF51 vs STM32F1 #1516

Open gfwilliams opened 6 years ago

gfwilliams commented 6 years ago

Just noticed this...

I guess it could be Cortex M0 vs M3 - but that seems like a hell of a difference

gfwilliams commented 6 years ago

__aeabi_dadd is also ~600 bytes on the nRF52832 - so this seems like a Cortex M0 issue :(

gfwilliams commented 10 months ago

Still 630 on nRF528540, 1772 bytes on nRF51.

We did manage to make a new __aeabi_dsub which just flipped the sign and called __aeabi_add so that halves the memory use.

@fanoush any thoughts? If it were fixable it'd be an easy way to gain 1k of space on nRF51. But maybe there's just no nice way to do this efficiently on the M0...