3 ms·
Hmm... Because 32-bit Windows IRQ handler doesn't save FPU/SIMD state, Rust also needs to have ability to suppress any FPU/SIMD output, when generating code to
by vardump 11y ago
Hmm... Because 32-bit Windows IRQ handler doesn't save FPU/SIMD state, Rust also needs to have ability to suppress any FPU/SIMD output, when generating code to run under 32-bit Windows kernel at DIRQL (= interrupt handler). Otherwise the mayhem in userland will be rather interesting, usermode thread SIMD state gets corrupted.
It'd definitely be tricky to use Rust for kernel drivers, but still so tempting!
- daeken 11y agoHm, I bet there's a flag to disable SIMD entirely (not really important here), and maybe even enable softfp if you use any floats in your code (or libraries, by extension). That'd be interesting to hack in, if it's not already there.
- rkangel 11y agoI've written C almost every day at work for ~7 years, and I have maybe written the keyword 'float' half a dozen times. I do embedded and systems development - you never need floating point in that sort of environment. It's only when you get into application domains that you need it.
- stephencanon 11y agoThere are a number of architectures where you leave half of the performance of little things like memset and memcpy on the table without SIMD. as a footnote: everytime in my career that someone has said "you never need floating point in X [kernel/network stack/some embedded thing/boot/whatever]," they've come back within a year to ask for my help with floating point library routines for X. So now you've cursed yourself =)
- com2kid 11y agoAs an embedded developer let me say that the Cortex M4s with FPUs are worth their weight in gold for saving me from debugging fixed point libraries.
- GFK_of_xmaspast 11y agoI never ever ever want to write fixed point numerics again.
- pcwalton 11y agoYou can use the -C switches in rustc to enable and disable hardware features such as FP and SIMD.