[Gc] Porting gc to IBM AS/400

Peter Colson pcolson at connexus.net.au
Thu Oct 14 00:03:50 PDT 2004


On 14/10/2004, at 3:17 AM, Ben Hutchings wrote:

> Peter Colson wrote:
> <snip>
>> Now, it's the "need assembly code" that provides a problem. The 
>> AS/400 is a platform that does not provide access to native machine 
>> code. The system only presents OS API's and an abstract MI (machine 
>> interface) layer rather than the typical native machine interface 
>> accessable via assembler code. As such there is no register access 
>> available, among other things.
>
> There is no need to have access to the native machine.  You just need 
> to be able to get the contents of any registers in the virtual machine 
> that your program runs in.

Of which there are none that I'm aware of (registers, that is)...

>   (If it is purely stack-based then there may be no need to write any 
> machine-specific code.)

Indeed, maybe that's what I'm looking at here. If that's the case libgc 
only needs to be able to scan statically allocated memory or stack 
allocated memory. The pushing of registers onto the stack can be 
ignored (GC_generic_push_regs, that is). How does this sound?

>   I believe there is an assembly language for this virtual machine.

If there is it's well hidden! I'm told the compiler actually produces 
instructions in intermediate code form that pass through a Common Use 
Back End (CUBE) that can then access machine capabilities. There is 
further processing and a System Licensed Internal Code (SLIC) layer 
(hiding the underlying hardware?). Also, the compiler (or the code 
produced by it) has a certain privileged access level not available to 
application programs.

Common users only get to see the abstract MI layer which has no concept 
of registers.


Regards,
Peter Colson.



More information about the Gc mailing list