public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: dj@stealth.ctron.com (DJ Delorie)
To: rms@gnu.ai.mit.edu
Cc: hjl@nynexst.com, gas2@cygnus.com, masaki@eie.minolta.co.jp,
	raeburn@cygnus.com
Subject: Re: [masaki@eie.monolta.co.jp: GAS bug and etc]
Date: Fri, 11 Nov 1994 10:46:00 -0000	[thread overview]
Message-ID: <9411111848.AA05929@delorie> (raw)
In-Reply-To: <9411111830.AA21125@mole.gnu.ai.mit.edu>

> Supporting 16-bit mode assembly for the 386 is not harmful if it is
> easy, but if it takes up a lot of time, then it might be better off
> left out.  Do we need to have a program that runs in 16-bit mode for
> booting?  If so, how big a program would it have to be?  (I presume
> all it needs to do is switch to 32-bit mode.)  Might it be easier to
> hand assemble that program than to add and subsequently maintain this
> gas feature?

Even when in protected mode, the 386 and up processors support
variable width operations.  For example, when C calls for a "short",
the 386 uses a 16-bit register and thus needs 16-bit operations.  This
has nothing to do with the runtime mode of the CPU or the default size
of the segment (16 vs 32), and must be supported on all 386-based
systems, including Hurd.

The theory is that since gas must already support these 16-bit
instructions for the i386 anyway, it should be trivial to tell it that
the *default* size should be assumed different, so that it would
produce code that assumed it was running in a 16-bit segment instead
of a 32-bit segment.  Then, the only work that would need to be done
is to produce dos-style OMF output, which is also used for some 32-bit
systems.

As for the separate topic of bootstrapping 32-bit programs in the
16-bit world of DOS, we've got that covered already, so that you can
fully bootstrap djgpp 2.0 with nothing but GNU tools.  We wrote a VERY
simple 16-bit assembler with which to assemble the bootstrap code.

DJ



  reply	other threads:[~1994-11-11 10:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-11  6:11 DJ Delorie
1994-11-11  6:28 ` H.J. Lu
1994-11-11  6:37   ` DJ Delorie
1994-11-11  6:45     ` H.J. Lu
1994-11-11  6:49       ` DJ Delorie
1994-11-11  7:06         ` H.J. Lu
1994-11-11 10:31         ` Richard Stallman
1994-11-11 10:46           ` DJ Delorie [this message]
1994-11-11 14:27             ` Richard Stallman
1994-11-11 15:01               ` Arthur Kreitman
1994-11-11 13:42 mycroft

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=9411111848.AA05929@delorie \
    --to=dj@stealth.ctron.com \
    --cc=gas2@cygnus.com \
    --cc=hjl@nynexst.com \
    --cc=masaki@eie.minolta.co.jp \
    --cc=raeburn@cygnus.com \
    --cc=rms@gnu.ai.mit.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 read-only IMAP folder(s) and NNTP newsgroup(s).