public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: dewar@gnat.com, gcc@gcc.gnu.org
Subject: Re: Big-endian Gcc on Intel IA32
Date: Mon, 17 Dec 2001 15:01:00 -0000	[thread overview]
Message-ID: <20011217145927.A15728@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0112171322170.1587-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Mon, Dec 17, 2001 at 01:40:04PM -0800

On Mon, Dec 17, 2001 at 01:40:04PM -0800, Linus Torvalds wrote:
> Hmm.. It sounds like one of those "obvious in principle" things, but I can
> imagine that it falls afoul of a lot of the gcc optimizations (ie x86.md
> has a pattern for doing "load + and $255" with a "movzbl" instruction,
> which is legal only on little-endian data: on big-endian you can still do
> it, but you have to modify the address).

Except that if gcc had generated a big-endian load, you'd
have "load + swap + and" in the instruction stream, which
wouldn't use movzbl.

I don't think there's anything conceptually complex about
adding this extension, just tedious.

> I actually think that it might be equally powerful to just have a way of
> "tainting" certain pointers, and disallowing their use at compile-time
> unless the recipient claims to accept the specific form of "tainting".
> This is, in fact, more-or-less what the "const" qualifier does, but it
> might be useful to allow user-defined "taints".

This runs afoul of a long-standing misfeature that a pointer to
Thing forgets about the attributes that Thing carried.  Fixing
this is desirable, but no one has stepped forward to do it.

As for the user-defined taint, implementing that should be as
simple as defining a type attribute with some string/identifier 
argument that does nothing.  Since the attribute modifies the
type, a declaration with and without should be incompatible.

Dunno how far you'd be able to go with this, given the rabid
casting to unsigned long that tends to happen in the kernel...


r~

  parent reply	other threads:[~2001-12-17 23:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-17 13:14 dewar
2001-12-17 13:42 ` guerby
2001-12-17 13:43 ` Linus Torvalds
2001-12-17 14:22   ` guerby
2001-12-17 14:52     ` Linus Torvalds
2001-12-17 15:01   ` Richard Henderson [this message]
2001-12-17 15:12     ` Linus Torvalds
2001-12-17 15:54       ` Richard Henderson
2001-12-17 17:43         ` Linus Torvalds
2001-12-17 18:12           ` Richard Henderson
2001-12-18 11:55       ` Jason Riedy
2001-12-17 16:43   ` Ross Smith
2001-12-18  1:28 ` Florian Weimer
  -- strict thread matches above, loose matches on Subject: below --
2001-12-23  7:26 dewar
2001-12-23  7:06 dewar
2001-12-23  7:08 ` Florian Weimer
2001-12-20  5:36 Etienne Lorrain
2001-12-19 11:47 Bernard Dautrevaux
2001-12-19 13:09 ` Linus Torvalds
2001-12-18 11:41 Morten Welinder
2001-12-18 11:42 ` Phil Edwards
2001-12-18 14:48 ` Linus Torvalds
2001-12-18  3:49 dewar
2001-12-23  6:59 ` Florian Weimer
2001-12-17 18:39 dewar
2001-12-17 18:59 ` Per Bothner
2001-12-17 12:08 dewar
2001-12-17 13:10 ` Linus Torvalds
2001-12-17 14:00   ` Alan Lehotsky
2001-12-17 12:00 Ghanta, Bose

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=20011217145927.A15728@redhat.com \
    --to=rth@redhat.com \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=torvalds@transmeta.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).