public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Chris Lattner <clattner@apple.com>
Cc: "LLVM Developers Mailing List" <llvmdev@cs.uiuc.edu>,
	"Török Edwin" <edwintorok@gmail.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [LLVMdev] inline asm semantics: output constraint width smaller than	input
Date: Sat, 24 Jan 2009 13:10:04 -0800	[thread overview]
Message-ID: <497B83AC.5060801@zytor.com> (raw)
In-Reply-To: <9A54B928-B0FA-46E9-B963-E24C642F09DA@apple.com>

Chris Lattner wrote:
> 
> We would like to support some more specific cases (e.g. when tying a
> pointer/int to a different size pointer/int) but we currently don't
> intend to support all cases (e.g. tying a FP value to int).  We are in
> this position because the semantics are very vague and hard to reason
> about (and change based on target endianness) and we had many subtle
> bugs in the corner cases.
> 
> Instead of having silent miscompiles, we decided to just reject all the
> "hard" cases and add them back one by one as there is demand.  That way
> users could choose to modify their asms instead of having them be
> potentially silently miscompiled.
> 

The case that matters for the kernel is integer to integer, when a
register is re-used from input to output.

> LLVM 2.5 is in its release process right now, so it will not have
> improvements in this area, but LLVM 2.6 certainly could.  If there is
> interest in building the kernel with 2.5, I think taking the patches
> would be worthwhile.  If that is hopeless anyway, waiting for the
> LLVM-side fixes should be fine.

The patches don't look all that bad to me, but I really want to make
sure we don't keep littering the kernel with workarounds for N different
compilers without getting a track to have them cleaned up.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  reply	other threads:[~2009-01-24 21:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 17:57 inline asm semantics: output constraint width smaller than input Török Edwin
2009-01-23 18:17 ` Ingo Molnar
2009-01-23 18:21   ` H. Peter Anvin
2009-01-23 18:27   ` Török Edwin
2009-01-23 18:30     ` Ingo Molnar
2009-01-23 18:52       ` Török Edwin
2009-01-23 20:42         ` Török Edwin
2009-01-24 16:23     ` Török Edwin
2009-01-24 17:27       ` Ingo Molnar
2009-01-24 18:57         ` Török Edwin
2009-01-24 21:25           ` [LLVMdev] " Mike Stump
2009-01-24 19:23         ` Chris Lattner
2009-01-24 21:10           ` H. Peter Anvin [this message]
2009-01-27 19:42         ` Duncan Sands
2009-01-27 21:25           ` H. Peter Anvin
2009-01-28  1:45             ` Kyle Moffett
2009-01-28  1:56               ` H. Peter Anvin
2009-01-28 13:28                 ` Kyle Moffett
2009-01-28 17:29                   ` H. Peter Anvin
2009-01-28 19:27                     ` Kyle Moffett
2009-01-28 20:59                       ` H. Peter Anvin
2009-01-24 20:07       ` Andreas Schwab

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=497B83AC.5060801@zytor.com \
    --to=hpa@zytor.com \
    --cc=clattner@apple.com \
    --cc=edwintorok@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvmdev@cs.uiuc.edu \
    --cc=tglx@linutronix.de \
    /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