mailto: blog -at- heyrick -dot- eu

Navi: Previous entry Display calendar Next entry
Switch to desktop version

FYI! Last read at 14:34 on 2024/05/03.

SharedCLibrary versions

On the RISC OS forum, the question was raised as to what library versions should an application ask for?

Well, a compiled program has a "stubs" part stuck at the end which does all the interfacing with the library, and part of it looks like this:

What we can see from this is that the minimum that is required is to have SharedCLibrary 5.17 and FPEmulator 4.03.

The current library version is something like 6.03, and it looks as if a good many programs ask for 5.34 (but not all, some want later) so what is actually different and why would you want to specify a version?

The answer is simple - you'd want to require a version of the library that offers the features that you need.

Briefly:

Versions following are less "major change", so will simply be listed with the salient points. No mention is made of RISC_OSLib changes, as you ought to have the latest version if you're using a recent DDE.

With this in mind, everybody ought to be using the latest version of CLib, however for your own programs...

 

 

Your comments:

Gavin Wraith, 18th March 2020, 22:40
Many thanks for this, Rick. Let us hope it will not be too long before CLib also supports VFP and Neon.
David Pilling, 22nd March 2020, 02:42
I never seem to do the right thing - perils of being involved for so long - RMEnsure a version and someone will decide one should not. Interesting to read of the differences though - I did not appreciate those.
Rick, 24th March 2020, 21:42
Yes, I hope CLib soon supports VFP, as emulating FP on a machine with it in hardware (and hundreds of times faster) is rather untenable. 
 
Unfortunately it is not as simple as plugging in a different set of instructions. Unlike FPE which only requires some registers to be preserved, VFP uses contexts. Also, the byte ordering of the FP values in memory is the other way around, so anything that works directly with that (casting, printf, etc) will need versions that understands both VFP (for new apps) and FPE (for everything else). 
Rick, 24th March 2020, 21:48
FP values are defined by IEEE aren't they? Aside from byte order, they're the same thing, yes? 
Assuming so... 
 
Personally, the way I'd do it is to write all the FP routines to work with VFP values. And have a flag set by the application if it supports VFP. 
Then, upon dealing with an FP value, if the flag is NOT set, then flip the byte ordering. In this way, the default is for direct support of VFP for speed, and any time lost due to constant byte flipping for FPE will be negligible compared to using the maths emulator itself... 

Add a comment (v0.11) [help?]
Your name:

 
Your email (optional):

 
Validation:
Please type 16639 backwards.

 
Your comment:

 

Navi: Previous entry Display calendar Next entry
Switch to desktop version

Search:

See the rest of HeyRick :-)