public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/9] New back end ia16: 16-bit Intel x86
@ 2017-04-01 16:47 Andrew Jenner
  2017-04-03 15:26 ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Jenner @ 2017-04-01 16:47 UTC (permalink / raw)
  To: GCC Patches

About 10 years ago, Rask Ingemann Lambertsen sent a patch series to add 
a 16-bit x86 (i.e. 8088, 8086, 80186 and 80286 CPUs) back end. This work 
was never committed. Recently I've been doing some work on this back 
end, and today we released a Sourcery CodeBench Lite distribution based 
on it (see 
https://blogs.mentor.com/embedded/blog/2017/04/01/announcing-sourcery-codebench-lite-for-ia16/ 
). Given this, I thought it would be a good idea to send these patches 
upstream today (though obviously if I commit these it won't be until 
we're in Stage 1 and more testing has been done on the middle-end changes).

I have not been able to contact Rask Ingemann Lambertsen, but he does 
have a copyright assignment for GCC on file (dated 2006-11-16) so I do 
not believe there are any copyright assignment issues that would block this.

On top of the original patch, here is what I have done:
* Ported to GCC 6.3.
* Switched from reload to LRA.
* Added C++ support.
* Added startup code, BSP and string functions to Newlib.
* Improved prologue/epilogue generation.
* Implemented stack usage and sibling calls.
* Fixed many bugs.
* Improved the testsuite to have better support for 16-bit ports.

My intention is to continue to develop this back end. I'm happy to be 
maintainer of it as an in-tree port or (if the steering committee does 
not want this port in-tree) as an out-of-tree port. I plan to add 
further code generation improvements and features including:
* Far pointers.
* Support for OMF .obj files and DOS .exe files in binutils.
* x87 floating point.
* Debugging support.
* More C library functions (to improve compatibility with other DOS 
compilers).

Contents of the patch set:
1: Top-level config.sub.
2: The port itself.
3: Documentation.
4: libstdc++ changes.
5: libstdc++ testsuite changes.
6: gcc testsuite changes.
7: ira-color.c fix.
8: subreg_get_info fix.
9: c-family/c-cppbuiltin.c fix.

Test results are at
https://gcc.gnu.org/ml/gcc-testresults/2017-04/msg00088.html


To answer some questions that came up last time the port was submitted:

* This port is only useful for targetting CPUs prior to the 80386. If 
you want to generate code for a 32-bit x86 CPU that runs in 16-bit mode 
(e.g. for a bootloader) the i386 target has the -m16 option for this case.

* I'm not interested in changing the name from ia16. I'd have preferred 
i086 or i86 (by analogy with i386) but I don't feel strongly enough to 
argue about it or change it. If someone else cares strongly enough about 
it to write the patches, I'll consider it.

* I'm also not interested in merging this port with the i386 back end. 
The targets are too different, and it would create an excessive 
maintenance burden for ia16 and (worse) for i386.

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/9] New back end ia16: 16-bit Intel x86
  2017-04-01 16:47 [PATCH 0/9] New back end ia16: 16-bit Intel x86 Andrew Jenner
@ 2017-04-03 15:26 ` Jeff Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Law @ 2017-04-03 15:26 UTC (permalink / raw)
  To: Andrew Jenner, GCC Patches

On 04/01/2017 10:47 AM, Andrew Jenner wrote:
> About 10 years ago, Rask Ingemann Lambertsen sent a patch series to add
> a 16-bit x86 (i.e. 8088, 8086, 80186 and 80286 CPUs) back end. This work
> was never committed. Recently I've been doing some work on this back
> end, and today we released a Sourcery CodeBench Lite distribution based
> on it (see
> https://blogs.mentor.com/embedded/blog/2017/04/01/announcing-sourcery-codebench-lite-for-ia16/
> ). Given this, I thought it would be a good idea to send these patches
> upstream today (though obviously if I commit these it won't be until
> we're in Stage 1 and more testing has been done on the middle-end changes).
>
> I have not been able to contact Rask Ingemann Lambertsen, but he does
> have a copyright assignment for GCC on file (dated 2006-11-16) so I do
> not believe there are any copyright assignment issues that would block
> this.
Note that with the trunk in stage4 and a release rapidly approaching, 
it's unlikely that anyone will be looking in depth at this until after 
the release branch is cut.

jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/9] New back end ia16: 16-bit Intel x86
  2007-07-30 14:37 Rask Ingemann Lambertsen
@ 2007-08-09 20:28 ` Rask Ingemann Lambertsen
  0 siblings, 0 replies; 4+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-08-09 20:28 UTC (permalink / raw)
  To: gcc-patches

On Mon, Jul 30, 2007 at 03:42:17PM +0200, Rask Ingemann Lambertsen wrote:
 
>    Test results are at
> <URL:http://gcc.gnu.org/ml/gcc-testresults/2007-07/msg01175.html>. I have
> more testsuite patches coming, so the results will improve. The simulator
> setup is also rather crude at the moment and I'll post a folloup to this
> message in the next few days with more details once I tie a few loose ends.

   Download these files:
http://nospamnospam.homepage.dk/gcc/download/newlib.patch
http://nospamnospam.homepage.dk/gcc/download/newlib.tar.gz
http://nospamnospam.homepage.dk/gcc/download/unix.exp

1) Create a combined tree with newlib and libgloss.
2) Apply newlib.patch.
3) Extract newlib.tar.gz.
4) Find binutils for an i386 ELF system somewhere and create links to the
binaries as ia16-unknown-elf-{as,ld,ar,ranlib,strip,nm}.
5) Configure --target=ia16-unknown-elf and build as with any other target.

   There's a quick and dirty simulator for Linux/ia32 systems included. It's
only a wrapper around the vm86() system call and provides none of the fancy
stuff, just arguments and return value. Use unix.exp above when running the
testsuite. Note: It needs to be called unix.exp.

-- 
Rask Ingemann Lambertsen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 0/9] New back end ia16: 16-bit Intel x86
@ 2007-07-30 14:37 Rask Ingemann Lambertsen
  2007-08-09 20:28 ` Rask Ingemann Lambertsen
  0 siblings, 1 reply; 4+ messages in thread
From: Rask Ingemann Lambertsen @ 2007-07-30 14:37 UTC (permalink / raw)
  To: gcc-patches

   This is a patch set to add a new back end for 16-bit x86 CPUs. I'll be
posting the following nine parts:

1: top-level config.sub
2: reload: reloads_unique_chain_p()
3: reload: reload_reg_free()
4: reload: push_reload() and reload_inner_reg_of_subreg()
5: Misc config stuff and config/ia16
6: docs
7: backends.html
8: testsuite fixes
9: testsuite skip/xfail

   The back end expects code, data and stack to exist in a single 64 kB
segment and hardware floating point is not implemented.

   Test results are at
<URL:http://gcc.gnu.org/ml/gcc-testresults/2007-07/msg01175.html>. I have
more testsuite patches coming, so the results will improve. The simulator
setup is also rather crude at the moment and I'll post a folloup to this
message in the next few days with more details once I tie a few loose ends.

-- 
Rask Ingemann Lambertsen

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-03 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01 16:47 [PATCH 0/9] New back end ia16: 16-bit Intel x86 Andrew Jenner
2017-04-03 15:26 ` Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2007-07-30 14:37 Rask Ingemann Lambertsen
2007-08-09 20:28 ` Rask Ingemann Lambertsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).