[Gc] Porting gc to IBM AS/400
ben.hutchings at businesswebsoftware.com
Thu Oct 14 02:17:01 PDT 2004
Peter Colson wrote:
> On 14/10/2004, at 3:17 AM, Ben Hutchings wrote:
>> Peter Colson wrote:
>> (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?
It sounds reasonable. Of course you still need to locate the stack(s)
but one of the sort-of-portable heuristics may work.
>> 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.
The MI compiler is approximately an assembler, though. Apparently there
is also a lower-level assembly language called W-code which is used by
the more modern AS/400 compilers but is not publicly documented.
More information about the Gc