[PATCH v2 0/4] MR375: ntdll: Fixes for runtime 64-bit shift functions.

Zebediah Figura (she/her) zfigura at codeweavers.com
Wed Jul 6 22:33:53 CDT 2022


On 7/6/22 10:50, Jinoh Kang (@iamahuman) wrote:
> Jinoh Kang (@iamahuman) commented about dlls/ntdll/large_int.c:
>> +
>>   /******************************************************************************
>>    *        _allshl   (NTDLL.@)
>> - *
>> - * Shift a 64 bit integer to the left.
>> - *
>> - * PARAMS
>> - *  a [I] Initial number.
>> - *  b [I] Number to shift a by to the left.
>> - *
>> - * RETURNS
>> - *  The left-shifted value.
>>    */
>> -LONGLONG WINAPI _allshl( LONGLONG a, LONG b )
>> +__ASM_GLOBAL_FUNC( _allshl,
>> +                   "xchgl (%esp),%ecx\n\t"
> Maybe a nit, and this pattern also resides in other preëxisting code already, but do we _really_ want to use a full memory barrier in such cases?
> 

I'm inclined to think it's not worth coding more assembly just to 
squeeze every last bit of performance out of these functions.



More information about the wine-devel mailing list