Skip to contentSkip to conversation

GCC port for Intel 8086, 80186 and 80286

DISCUSSION Rask Ingemann Lambertsen 8 participants 10 messages Aug 9, 2007 – Aug 31, 2007

lore
Share & tools
lore
#0 lore raw

Aa week and a half ago, I posted patches to the GCC patches mailing list
with a new back end to generate code for Intel 8086-80286 CPUs. The back end has not yet been accepted for inclusion into GCC and there is some debate about how that should be done, but I thought you might want to know anyway. The messages with the essential parts are here:

http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02108.html
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00599.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02109.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02110.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02112.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02114.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02117.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02131.html

Signature · 1 line
Rask Ingemann Lambertsen
#1 lore raw

Rask Ingemann Lambertsen wrote, on 8/9/2007 12:56 PM:

Quoted 2 lines

Aa week and a half ago, I posted patches to the GCC patches mailing list
with a new back end to generate code for Intel 8086-80286 CPUs. The back end

Just the fact that someone is going to the trouble is quite heartening. Thanks for letting us know!

Royce

Signature · 3 lines
Royce D. Williams                                  IP Engineering, ACS
http://www.tycho.org/royce/                   - PGP: 3FC087DB/1776A531
   Let him who would move the world first move himself. - Socrates
#2 lore raw
In reply to Rask Ingemann Lambertsen

Hi Rask,

This is quite impressive, what is the reason for this work?

Regards,
Hans.

www.ht-lab.com

----- Original Message ----- From: "Rask Ingemann Lambertsen" <[email protected]>
To: <[email protected]>
Sent: Thursday, August 09, 2007 9:56 PM
Subject: GCC port for Intel 8086, 80186 and 80286

Quoted 22 lines

Aa week and a half ago, I posted patches to the GCC patches mailing list
with a new back end to generate code for Intel 8086-80286 CPUs. The back end has not yet been accepted for inclusion into GCC and there is some debate about how that should be done, but I thought you might want to know anyway. The messages with the essential parts are here:

http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02108.html
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00599.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02109.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02110.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02112.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02114.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02117.html
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg02131.html

Signature · 5 lines
Rask Ingemann Lambertsen
-
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 3 lines · Hans

Hi Rask,

This is quite impressive, what is the reason for this work?

I have an embedded system with an 80186 and initial experiments with bcc
showed that code quality wasn't good enough.

Signature · 1 line
Rask Ingemann Lambertsen
#4 lore raw
In reply to Rask Ingemann Lambertsen
Quoted 4 lines · Rask Ingemann Lambertsen

Aa week and a half ago, I posted patches to the GCC patches mailing list
with a new back end to generate code for Intel 8086-80286 CPUs. The back end has not yet been accepted for inclusion into GCC and there is some debate about how that should be done, but I thought you might want to know anyway.

I've just posted an update which inludes support for generating ELKS
binaries. Please see <URL:http://gcc.gnu.org/ml/gcc-patches/2007-08/msg02195.html>.

Signature · 1 line
Rask Ingemann Lambertsen
#5 lore raw

Hi Rask,
congratulations!

I hope ELKS become active newly and in future it can be integrated to main kernel just like happened to uclinux. I known ELKS is based in a very old kernel source, but we can dream about it.

Just dreaming :-)

Alan

2007/8/30, Rask Ingemann Lambertsen <[email protected]>:

Quoted 17 lines · Rask Ingemann Lambertsen
Quoted 4 lines

Aa week and a half ago, I posted patches to the GCC patches mailing list
with a new back end to generate code for Intel 8086-80286 CPUs. The back end has not yet been accepted for inclusion into GCC and there is some debate about how that should be done, but I thought you might want to know anyway.

I've just posted an update which inludes support for generating ELKS
binaries. Please see <URL:http://gcc.gnu.org/ml/gcc-patches/2007-08/msg02195.html>.

--
Rask Ingemann Lambertsen
-
To unsubscribe from this list: send the line "unsubscribe linux-8086" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 10 lines
------------------------------------------------------------
|                     Alan Carvalho de Assis                |
------------------------------------------------------------
--
Não importa o que os outros irão pensar,
A cura para a infelicidade é a felicidade
-
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

2007/8/30, Rask Ingemann Lambertsen <[email protected]>:

Quoted 3 lines

I've just posted an update which inludes support for generating ELKS
binaries. Please see <URL:http://gcc.gnu.org/ml/gcc-patches/2007-08/msg02195.html>.

Awesome - I would so have loved to have this way back when. Now to find time to try it out...

Quoted 8 lines · Alan Carvalho de Assis

Hi Rask,
congratulations!

I hope ELKS become active newly and in future it can be integrated to main kernel just like happened to uclinux. I known ELKS is based in a very old kernel source, but we can dream about it.

Just dreaming :-)

If you're interested in working on mainline tree stuff look into a ucLinux port to i386, if there isn't already one*, and in addition a cool ucLinux-centric distribution/packaging. OpenEmbedded would be a good base since you can build for many different archs, but it can be a bit interesting to wrangle ;)

(* - yes this sounds nuts... but it might be faster than regular Linux and probably smaller. At least Samsung's people measured that while working on mmu-less ARM ucLinux.)

- Chad

#7 lore raw
In reply to Alan Carvalho de Assis
Quoted 6 lines · On Thu, 30 Aug 2007 13:43:52 -0300 "Alan Carvalho de Assis"…

Hi Rask,
congratulations!

I hope ELKS become active newly and in future it can be integrated to main kernel just like happened to uclinux. I known ELKS is based in a very old kernel source, but we can dream about it.

Well the first step to sanity would be moving the kernel code to the 8086 gcc, getting ansi prototypes and sane C. That means sorting the asm out with gcc asm which frankly scares me 8)

#8 lore raw
Quoted 10 lines · Alan Cox

On Thu, 30 Aug 2007 13:43:52 -0300
"Alan Carvalho de Assis" <[email protected]> wrote:

Well the first step to sanity would be moving the kernel code to the 8086 gcc, getting ansi prototypes and sane C. That means sorting the asm out with gcc asm which frankly scares me 8)
-

I don't know very well what are the differences between the 2 codes, but I think that is possible to use a recursive bash script to automatically replace lines that have to be replaced and go.
I thought at something like this:
#!/bin/bash

for i in grep -R "text that is in files to be replaced" elks/* | cut -f1-1 -d ":"
do
sed -i -e 's,old code,new code,g' $i
sed -i -e 's,old code,new code,g' $i
...
done

It is a good idea?
I hope yes.

#9 lore raw

You forget that assembler directives are different for Gnu Assembler (gas) and the bcc assembler. Not to forget the fact that gas accepts instructions like movl, movd etc and many other assemblers do not. they only accept mov, and figure out the size of the data based on the registers used as operands. It will have to be done manually and checked thoroughly.

Quoted 36 lines · Eddy
Quoted 10 lines · Alan Cox

On Thu, 30 Aug 2007 13:43:52 -0300
"Alan Carvalho de Assis" <[email protected]> wrote:

Well the first step to sanity would be moving the kernel code to the 8086 gcc, getting ansi prototypes and sane C. That means sorting the asm out with gcc asm which frankly scares me 8)
-

I don't know very well what are the differences between the 2 codes, but I think that is possible to use a recursive bash script to automatically replace lines that have to be replaced and go.
I thought at something like this:
#!/bin/bash

for i in grep -R "text that is in files to be replaced" elks/* | cut -f1-1 -d ":"
do
sed -i -e 's,old code,new code,g' $i
sed -i -e 's,old code,new code,g' $i
...
done

It is a good idea?
I hope yes.

-
To unsubscribe from this list: send the line "unsubscribe linux-8086" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
http://www.vikaskumar.org/