git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH 2/4] msvc: Select the "fast" definition of the {get,put}_be32() macros
Date: Sat, 26 Jun 2010 13:31:12 -0500	[thread overview]
Message-ID: <20100626183111.GB13070@burratino> (raw)
In-Reply-To: <4C250DD2.2030801@ramsay1.demon.co.uk>

Ramsay Jones wrote:
> Jonathan Nieder wrote:

>> -#if defined(__i386__) || defined(__x86_64__)
>> +#if defined(__i386__) || defined(__x86_64__) || \
>> +	defined(_M_IX86) || defined(_M_X64)
>>    #define setW(x, val) (*(volatile unsigned int *)&W(x) = (val))
>
> I looked at this, but decided not to make this change (while adding
> an item to my TODO list to investigate further).

Mmm, my only complaint is that leaving out this change makes the
code appear to do something other than it does.  Maybe a comment
would help.

> After reading the large comment before line 57, and with a vague
> recollection of the mailing list discussion, I was left with the
> impression that this was aimed specifically at a quirk of the gcc
> code generator.

Sort of, but sort of not.  Using volatile here is saying “I really
want to do these stores in this order”.  And that is probably the
right thing to do for _any_ code generator on x86, unless it is very
smart.

> In other words, maybe line 57 should read:
>
> #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))

That would exclude icc etc so I’d prefer to avoid it without
empirical evidence.

> It should probably be investigated at some point, but I don't think
> it's an urgent issue (and the msvc build will be no worse off ;-).

Right, I agree with this. :)  So for what it’s worth:

  Acked-by: Jonathan Nieder <jrnieder@gmail.com>

I am referring to your original patch $gmane/149542 here.

Thanks.

  reply	other threads:[~2010-06-26 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 19:47 [PATCH 2/4] msvc: Select the "fast" definition of the {get,put}_be32() macros Ramsay Jones
2010-06-24 11:21 ` Jonathan Nieder
2010-06-25 20:13   ` Ramsay Jones
2010-06-26 18:31     ` Jonathan Nieder [this message]
2010-06-30 19:53       ` Ramsay Jones

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=20100626183111.GB13070@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsay1.demon.co.uk \
    /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).