public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@llwyncelyn.cymru>
To: Juan Perez-Sanchez <lithoxs@gmail.com>
Cc: linux-8086 <linux-8086@vger.kernel.org>
Subject: Re: New GCC compiler for 8086 cpu's
Date: Tue, 20 Jun 2017 12:37:44 +0100	[thread overview]
Message-ID: <20170620123711.2f7d79d3@alans-desktop> (raw)
In-Reply-To: <CAD6VGuaTqUWDV5RDeiPiXqjcHik6FsJ2pSqoOSpNwSjz=xLkhA@mail.gmail.com>

> Of course, this is the kind of problems I expect to happen. To prevent
> this case, one rule of the simple set of rules would be "Use automatic
> variables only within the function where it is defined".

That still doesn't work. The compiler will generate address references to
stack objects itself as will normal things like pointers into an array.

Faced with s = s + 1 for an auto variable the compiler is likely to
generate something like a word increment of &s, but it's not going to
magically put segments in.

The DOS folks spent a long time writing very good compilers - they never
figured out a hack for this; although in many other languages SS != DS
isn't a problem.

Alan

  reply	other threads:[~2017-06-20 11:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14  0:08 New GCC compiler for 8086 cpu's Juan Perez-Sanchez
2017-06-14  6:47 ` Tom
2017-06-14 19:53   ` Juan Perez-Sanchez
2017-06-15 10:19 ` Edoardo
2017-06-15 22:53   ` Juan Perez-Sanchez
2017-06-16 13:33     ` David O'Shea
2017-06-16 18:57       ` Juan Perez-Sanchez
2017-06-19  3:58         ` David O'Shea
2017-06-19  6:58           ` Georg Potthast
2017-06-19  9:15             ` David O'Shea
2017-06-19 19:36           ` Juan Perez-Sanchez
2017-06-19 13:16       ` Alan Cox
2017-06-19 13:43     ` Alan Cox
2017-06-19 19:57       ` Juan Perez-Sanchez
2017-06-19 20:55         ` Alan Cox
2017-06-19 22:53           ` Juan Perez-Sanchez
2017-06-20 11:37             ` Alan Cox [this message]
2017-06-20 21:57               ` Juan Perez-Sanchez
     [not found]                 ` <CALgV52iFRay4y8dYrP0ZGnF2JQJi2h7c=QnSsDniv72azmFPbA@mail.gmail.com>
2017-06-20 22:46                   ` Fwd: " David Given

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=20170620123711.2f7d79d3@alans-desktop \
    --to=alan@llwyncelyn.cymru \
    --cc=linux-8086@vger.kernel.org \
    --cc=lithoxs@gmail.com \
    /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