RISC_OSLib and polling FP state
Rick Murray (539) 13754 posts |
Why on earth, in 2015 and RISC OS 5, does RISC_OSLib’s polling functions fart around with managing the FP state? I discovered this monstrosity while patching up Ovation (not Pro!) to build on the Pi and was shocked (shocked, I tell you!) to discover that RISC_OSLib was doing the exact same thing. Surely we aren’t under some mass delusion where RISC OS 2 is still being supported?!? Accordingly, I threw away the code and wrote:
(and ditto for Wouldn’t that be more appropriate for……well, any Wimp that isn’t RISC OS 2? |
David Feugey (2125) 2709 posts |
Rhooooo :) |
Rick Murray (539) 13754 posts |
Well, since Ovation is an APDL product (the late David Holden), there is the little issue of distribution. Namely that I can’t. Well, I can pass on the modified sources, just as I got the originals myself; but there’ll be no executables, no templates, no… you get the idea – at this time you’ll need a copy of Ovation (for the resources) and the DDE to build the project. Initial info here: http://www.heyrick.co.uk/blog/index.php?diary=20151023 This weekend’s mods described here: http://www.heyrick.co.uk/blog/index.php?diary=20151025 |
Jon Abbott (1421) 2640 posts |
Kind of understandable if the underlying app is expecting the FPU to be in the same state on return. The code does state Only f4..f7 defined preserved over procedure call I smiled when I read emulated a lot faster than writeback and then immediately spotted the surrounding code wasn’t optimized.
Could be one instruction less:
|
David Feugey (2125) 2709 posts |
Perhaps that new apdl people will be happy to provide this version :) |
Rick Murray (539) 13754 posts |
Not really so understandable – all that code can be replaced by:
Why is RISC_OSLib duplicating something the Wimp can do for itself? |
Jon Abbott (1421) 2640 posts |
Ah…I understand now. I didn’t realise the Wimp could save the FPU state via the Poll flags. Yes, I agree with you then, let the Wimp handle it. |
Steve Pampling (1551) 8128 posts |
Maybe because RISC_OSLib is that old1 that it pre-dates that feature? Or maybe it was intended as an easier access? 1 Open box of code and pterodactyls emerge and circle? |
Rick Murray (539) 13754 posts |
Pterodactyls indeed. I wonder how much other outdated cruft is kicking around? |
Steve Pampling (1551) 8128 posts |
Most of R_OL ? |