[Coco] GCC - Direct page and Double Float - Potential solution.

John E. Malmberg wb8tyw at qsl.net
Tue Nov 18 08:04:00 EST 2003


According to the comments 68HC11 cross compiler that shipped with GCC 
3.3.1, the error message that I am now getting is because GCC 3.3.1 is 
out of registers.

For the registers that GCC uses, the 68HC11 has one less than the 6809, 
and that puts it at least 2 registers short.  It is hard to tell how 
many registers are needed at a minimum, as the 68HC11 used the direct 
page access to simulate more registers.


It looks like that either I will need to modify libgcc2.c to not build 
the routine that references the double type so that the rest of the make 
script will complete, or I will have to do what the 68HC11 did.

I am leaning toward doing what the 68HC11 did, and treat the direct page 
as a set of registers that have a higher cost than the CPU registers.

GCC apparently knows the relative expense of these access.  This 
interferes with what I really wanted to do with the direct page, but it 
makes it used effectively by the compiler.

 From what the OS9 programmers have stated, it looks like it would be ok 
to use area pointed to by the direct page register as additional registers.

I am not sure about Flex-09, but it appears that either it does not care 
about the direct page access, or it is easily delt with.  Since Extended 
Color Disk Basic will run out of ROM under Flex-09, and ROM basic uses 
the direct page for storage, it would tend to indicate that Flex-09 does 
not care.

But that leaves me with the case for programs or routines that would be 
run from Disk Basic.  I need to find out what direct page locations that 
BASIC does not care about if they get trashed.  Either that, or if a C 
routine is called from a BASIC program, it must have something that 
saves and restores the direct page register.

-John
wb8tyw at qsl.net
Personal Opinion Only




More information about the Coco mailing list