zgs
Joined 6 years ago
Joined 6 years ago
I spent close to ten years working closely with uClinux (a long time ago). I implemented the shared library support for the m68k. Last I looked, gcc still included my additions for this. This allowed execute in place for both executables and shared libraries -- a real space saver. Another guy on the team managed to squeeze the Linux kernel, a reasonable user space and a full IP/SEC implementation into a unit with 1Mb of flash and 4Mb of RAM which was pretty amazing at the time (we didn't think it was even possible). Better still, from power on to login prompt was well under two seconds.
A $1 Linux capable ARM: https://www.eevblog.com/forum/microcontrollers/the-$1-linux-...
I'd expect that there were even cheaper processors now since it's eight years later.
You are correct in that the decNumber library doesn't support trig operations. Arithmetic, log, exp and square root plus rounding and some conversion functions.
My experience is that decNumber is generally slow. Logarithms are especially slow. Intel's decimal library is much faster & as you noted, it uses binary operations to start it's algorithms.
0x08C0C166 = 2⁴ × 3 × 5⁵ × 11 × 89 + 1 = 10⁴ × 3 × 5 × 11 × 89 + 1
Plenty of values that can be reused (11 = 10 + 1 and 89 = 10² - 11).
Still, there is quite a bit of manipulation required and only 17 instructions to do them in.
I managed to put in shared execute in place library support, the limitation being the number of shared libraries rather than what they supported.
mean_power = mean_power + (power - mean_power) / count
The two page spread showing a graph of the implicit type conversions was a masterpiece.
"My hourly rating for figuring out your bug is $X".
The real issue is that we came to accept unsafe languages and are taking a really long time to put such features back.