4 ms·
I managed to compile for a 386 as a target for a no_std rust, but as far as running the compiler goes, might be SOL on that one. https://github.com/teknoman117
by Teknoman117 5y ago
I managed to compile for a 386 as a target for a no_std rust, but as far as running the compiler goes, might be SOL on that one.
https://github.com/teknoman117/ts-3100-images/tree/master/rustimage https://github.com/teknoman117/ts-3100-images/tree/master/ru...
(for this SBC: https://docs.embeddedarm.com/TS-3100 https://docs.embeddedarm.com/TS-3100)
My goal was to follow blog_os on this board for fun. Main sticky point is the 386 not having any hardware atomic operations (which didn't show up until 486).
I recently got a current Gentoo base environment booting on a 133 MHz AM5x86 based industrial SBC and it takes 3 minutes to compile hello world in C++ (70 seconds for C) so I'm not super confident you'd even want to use rust compiler on a 486, even for "a day in a programmer's life from 30 years ago" experiment.
- mmastrac 5y agoTechnically, as a single-core CPU, all operations are atomic. /s
- Teknoman117 5y agoI suppose I should say instructions which let you do critical sections without disabling preemption or interrupts =P
- mmastrac 5y agoHah yes. I got used to the CLI/STI pattern around perf-sensitive or concurrent code on <=386 back in the day. EDIT: though I wonder now if you could use the fact that flags are returned from basic memory ALU operations to implement some basic atomics.