git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Taylor Blau <me@ttaylorr.com>,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] block-sha1: remove use of assembly
Date: Wed, 9 Mar 2022 21:34:58 -0500	[thread overview]
Message-ID: <Yilj0qMqk5eC4TKo@nand.local> (raw)
In-Reply-To: <220310.86cziulls6.gmgdl@evledraar.gmail.com>

On Thu, Mar 10, 2022 at 12:52:31AM +0100, Ævar Arnfjörð Bjarmason wrote:
> >> I suspect it has the same problem.  My inclination is to just remove it,
> >> because my guess is that the compiler has gotten smarter between 2009
> >> and now.
> >
> > Almost certainly. I don't have a machine to test it on, either, but I
> > would be shocked if `make BLK_SHA=YesPlease DEVELOPER=1` worked on
> > master today on an arm machine.
>
> Why is that? The -pedantic error is specifically about
> "gnu-statement-expression", i.e. the bracket syntax, not the inline
> assembly per-se.
>
> The ARM assembly isn't using that, and we have other code __asm__ code
> compiled with -pedantic. E.g. I get the __asm__ in "compat/bswap.h" by
> default, and it passes -pedantic (the code starting around line 38).

You're right, I had this completely mixed up in my mind. In GitHub's
fork there is a spot I have been working near for the past couple of
days where there is inline assembly right below a statement expression.

The statement expression is what causes the -pedantic builds to fail,
not the inline __asm__. Indeed, if you just stick a memory barrier
anywhere in Git's codebase, we'll still compile under the DEVELOPER=1
builds.

> Isn't that __extension__ only needed *if* it warns under -pedantic,
> which AFAICT doesn't apply to all uses of __asm__ (but your compiler
> version etc. may be different...).

Yes, disregard that last suggestion :-).

Thanks,
Taylor

  parent reply	other threads:[~2022-03-10  2:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 23:25 [PATCH] block-sha1: remove use of assembly brian m. carlson
2022-03-07 23:32 ` Taylor Blau
2022-03-08  2:20   ` brian m. carlson
2022-03-08  2:22 ` [PATCH v2] " brian m. carlson
2022-03-08 13:38   ` Ævar Arnfjörð Bjarmason
2022-03-09 22:10     ` brian m. carlson
2022-03-09 22:32       ` Taylor Blau
2022-03-09 23:52         ` Ævar Arnfjörð Bjarmason
2022-03-10  1:59           ` Carlo Marcelo Arenas Belón
2022-03-10  2:34           ` Taylor Blau [this message]
2022-03-10 17:47 ` [PATCH v3] block-sha1: remove use of obsolete x86 assembly brian m. carlson
2022-03-10 19:18   ` Junio C Hamano

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=Yilj0qMqk5eC4TKo@nand.local \
    --to=me@ttaylorr.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    /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 NNTP newsgroup(s).