8 bit os_f handles

David J. Ruck druck at freeuk.com
Mon Mar 27 19:54:30 BST 2000


On Mon 27 Mar, Stewart Brodie wrote:
> In message <Marcel-1.53-0325135756-3136#xE at druck.freeuk.com>
>           "David J. Ruck" <druck at freeuk.com> wrote:
> > On a slighly different note; everyone should be thinking ARM 32 bit mode
> > conversion from now on. Its going to be a vast amount of work for every
> > RISC OS developer
> 
> I disagree.  C programmers will have no difficulty.

While most C programs can be recompiled with -apcs3/32 and linked with a 32
bit version of stubs, there will be certain API changes introduced
for the 32bit OS, such as varibale size Wimp_Blocks. How much 26bit backwards
compatibility will be built in is not known at this stage. Hopefull the
changes will be minor, but unlikely to be insignificant. Plus a certain
amount of the existing API that uses flags in the upper bits of addresses
will have to change, this will have implications for OSLib.

> Assembler programmers will have recipes for changing code.

Depending on how well the code is structured the function calling/entry/exit
points can be modified to either a callee saves flags, or the more efficent
but harder to analyise, caller saves flags.

However the major use for assembler is modules, and there are likely to be
major changes in that area. Many entry points returning by copying R14 or
unstacking the PC preserving flags - having the side effect of restoring
the PSR flags and processor mode - however in 32bit changes of mode will
require an explicit MSR from the SPSR.
 
>>  and one of the things we need to rely on is that essential libraries such
>> as OSLib, will be both 32bit ready and cater for all existing API's and
>> new extensions. Removing potential problems such as os_f now, will mean a
>> lot less work over the cirtical times to come.
 
> Making defmod capable of generating the correct stuff for 32-bit support is
> trivial.

There should be only need to be minor changes to ensure that the PSR is
preserved and the results of flag returning SWI's are copied to a regsister
from the PSR rather than the PC.

I'd like to see a 32bit version of OSLib as soon as possible. You cant link
programs with Stubs yet as its not 32 bit, but it should be build a 32bit
version of an older version of UnixLib that doesn't contain any assembler.

Cheers
---Dave

-- 
______________________________________________________________________

  David J. Ruck     Phone: 07974 108301     Email: druck at freeuk.com
______________________________________________________________________




More information about the oslib-user mailing list