[gnu.gcc] gcc on 8086

david@WUBIOS.WUSTL.EDU (David J. Camp) (02/09/90)

>
>
>I am interested in your project in the sense that I would like to be informed
>of your progress. Unfortunately, I can't do any work on it myself.
>
>Some time ago I tried unsuccessfully to use gcc to cross compile to a Z80
>chip. I learned a few things and still am interested in problems like this.
>But I am not very strong as a programmer.
>
>Your idea sounds reasonable, configuring the 8086 to look like a 32 bit
>machine and implementing on that 32 bit machine. You will have to explain
>things to gcc such as the registers of your machine. What are you going to
>tell it ?  Another problem might be that 8086 uses things like code

I think it may be necessary to establish certain RAM locations that
take on the role of registers for the pseudo machine.  I do not want to
try to explain to gcc all of the peculiar addressing modes of an 8086,
so the pseudo machine will have a different set of modes.  What I really
need at this point is an informed opinion on the kind of instructions
that would be necessary and efficient for gcc to produce.

>segments which have a certain limit on their size. How are you going to
>get around that limitation ?

It is easy for data references.  Every memory access can be derived from
a 32 bit value, as with Huge Model programs in the normal MS-Dos
compilers.  The hard part is the handling of flow control, when the code
segment must be updated every 64k.  One easy cop-out is to limit
individual functions to 64K of generated code and do long jumps between
the modules, again similiar to what is done in the existing compilers.

>
>I hope you don't mind discussing these things with someone who can't
>actually do any work on the project.
>
>Allan Adler
>ara@lom1.math.yale.edu
>

I had started designing a machine with minimal internal registers with
all of the operations done on the stack.  This is the opposite of the
RISC approach, but since we will be keeping things in memory anyway, the
stack architecture is no less efficient.  I still need to know from an
informed source what kind of instructions gcc likes to produce.  If it
would have a hard time with stacks, and likes registers, I am willing to
adjust my architecture to suit gcc.  -David-

Bitnet:   david@wubios.wustl                ^      Mr. David J. Camp
Internet: david%wubios@wugate.wustl.edu   < * >    Box 8067, Biostatistics
uucp:     uunet!wugate!wubios!david         v      660 South Euclid
Washington University (314) 36-23635               Saint Louis, MO 63110