Jinoh Kang (@iamahuman) commented about dlls/ntdll/large_int.c:
+__ASM_GLOBAL_FUNC( _allshr,
"xchgl (%esp),%ecx\n\t"
"pushl %edx\n\t"
"pushl %eax\n\t"
"pushl %ecx\n\t"
"jmp " __ASM_NAME("__regs__allshr") )
+ULONGLONG __regs__aullshr( ULONGLONG a, unsigned char b ) {
- return a >> b;
- const ULARGE_INTEGER x = { .QuadPart = a };
- ULARGE_INTEGER ret;
- if (b >= 64)
return 0;
Suggest using `b >= 64 ? 0 : x.HighPart >> (b & 31)` or its equivalent, as per the same reason for `_allshl`.
Compare:
- https://godbolt.org/z/8PjoMnGYj
With: