LKML Archive on
help / color / mirror / Atom feed
From: "H. Peter Anvin" <>
To: Jike Song <>
Cc: Ingo Molnar <>,,,
Subject: Re: [PATCH] x86: fix inline assembly constraints
Date: Thu, 30 Oct 2008 07:51:05 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Jike Song wrote:
> Yes, sometimes gcc did have bugs with its obscure inline asm
> conventions. But I think the change of x86-64 atomic operations should
> be OK. Anyway, the "+" constraint is more clear than a "=m" output and
>  a "m" input.
> The 32-bit atomic ops were already changed to "+m".(commit
> b862f3b099f3ea672c7438c0b282ce8201d39dfc)

You *THINK*.  It's very easy to *THINK* that gcc won't do something
utterly moronic, and you'd be wrong.

Just changing it for the sake of churn is pointless... if there is a
bug, then we have to take the risk anyway, but if it is already correct,
then there is no point in provoking a bug.  Not *your* bug, because your
code is correct, but gcc's bug.

FWIW, the reason that code doesn't use "+m" is because a version of gcc
which we no longer support didn't handle it.  That by itself isn't a
reason to keep it, but there is also no reason to just "tidy" it, IMNSHO.


  reply	other threads:[~2008-10-30 14:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 16:32 Jike Song
2008-10-29 16:32 ` Jike Song
2008-10-29 16:34 ` Ingo Molnar
2008-10-30  2:31   ` Jike Song
2008-10-30  3:54     ` H. Peter Anvin
2008-10-30  6:40       ` Jike Song
2008-10-30 14:51         ` H. Peter Anvin [this message]
2008-10-30 19:29     ` Ingo Molnar
2008-10-31  2:12       ` Jike Song
     [not found] <>
     [not found] ` <>
     [not found]   ` <>
2008-10-30  3:52     ` Robert Hancock

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] x86: fix inline assembly constraints' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).