Re: [PATCH 2/4] msvc: Select the "fast" definition of the {get,put}_be32() macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]