This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Cross GCC for AS400


I apologize to everyone for the off topic post.
If you want to continue this discussion, I'd be more than happy to offline
or at comp.sys.ibm.as400.misc.
I'll post this note there as well...

======== Offtopic
No compiler on the AS/400 (except the internal IBM OS/400 kernel (SLIC)
compiler) ever generates the machine instructions directly.
That's why compilers and applications don't have to change when we put a
new/different processor in an AS/400.

As a compiler writer, you generate a generic representation (IBM object
code called 'W-code') of the program and then the linker built into the
system (called the translator) generates machine instructions and creates a
'program object' that encapsulates them completely away from any APIs.
There are no direct mechanisms to access those machine instructions once
you've created the program.

You never get to see the actual bits of the program unless you dump the
program in hex.
Also, there is no OS/400/Power PC VM on the AS/400 because the translation
from W-code to machine instruction occurs at compile time. The W-code
representation is also saved with the program object so that when the
program object is restored to a different AS/400 with a different processor
type (yes, you can do this), the translation into machine instruction can
happen automatically.

There's a document available from IBM on the W-code format.
I believe its called the Compiler Writers Guide or some such thing.
I don't know how to get a hold of it.



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]