From: Richard Miller <miller@hamnavoe.demon.co.uk>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Plan9 16bit C compilers
Date: Mon, 18 Feb 2002 17:43:59 +0000 [thread overview]
Message-ID: <20020218174402.D613419A6E@mail.cse.psu.edu> (raw)
The original question from steve.simon@snellwilcox.com was
> Are there any 16bit ports of the plan9 C compiler?
I've ported (more accurately: retargeted) it for a 16-bit CPU which is
embedded in a smartcard. Because registers are 16 bits and I could
live within a 64KB address space, I chose to make sizeof(int) = 2,
sizeof(int*) = 2, sizeof(long) = 4. This avoided the need to keep
pointers in pairs of registers, but required some extra rewriting
because the existing compilers have some implicit assumptions
that sizeof(register) = sizeof(long) = sizeof(int*).
There is also one place in the "machine independent" part of the compiler
(/sys/src/cmd/cc/dcl.c:/^contig) which assumes sizeof(long) = sizeof(int*).
Nothing else in cc needed to be touched.
-- Richard
next reply other threads:[~2002-02-18 17:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <miller@hamnavoe.demon.co.uk>
2002-02-18 17:43 ` Richard Miller [this message]
2002-02-18 18:14 ` Scott Schwartz
2002-02-22 16:15 anothy
-- strict thread matches above, loose matches on Subject: below --
2002-02-20 10:55 forsyth
2002-02-18 13:14 forsyth
2002-02-20 10:08 ` Thomas Bushnell, BSG
2002-02-20 17:59 ` Scott Schwartz
2002-02-21 9:40 ` Douglas A. Gwyn
2002-02-21 10:08 ` Boyd Roberts
2002-02-21 18:06 ` Thomas Bushnell, BSG
2002-02-21 22:46 ` George Michaelson
2002-02-22 9:58 ` Thomas Bushnell, BSG
2002-02-22 10:58 ` George Michaelson
2002-02-15 14:08 Fco.J.Ballesteros
2002-02-15 13:59 Russ Cox
2002-02-15 13:57 Russ Cox
2002-02-15 14:02 ` Boyd Roberts
2002-02-18 10:14 ` Douglas A. Gwyn
2002-02-18 11:37 ` Boyd Roberts
2002-02-15 12:30 forsyth
2002-02-15 12:14 forsyth
2002-02-15 12:21 ` Boyd Roberts
2002-02-15 9:41 Fco.J.Ballesteros
2002-02-15 9:28 nigel
2002-02-14 16:15 steve.simon
2002-02-15 9:55 ` Douglas A. Gwyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020218174402.D613419A6E@mail.cse.psu.edu \
--to=miller@hamnavoe.demon.co.uk \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).