mirror of
https://github.com/reactos/reactos.git
synced 2025-03-01 03:45:16 +00:00
[VCRUNTIME] Fix _rotl64/_rotr64 inline asm
%k is only valid for 32 bit operands.
This commit is contained in:
parent
9db517f324
commit
13356a9001
1 changed files with 2 additions and 2 deletions
|
@ -1227,7 +1227,7 @@ __INTRIN_INLINE unsigned int __cdecl _rotl(unsigned int value, int shift)
|
||||||
__INTRIN_INLINE unsigned long long _rotl64(unsigned long long value, int shift)
|
__INTRIN_INLINE unsigned long long _rotl64(unsigned long long value, int shift)
|
||||||
{
|
{
|
||||||
unsigned long long retval;
|
unsigned long long retval;
|
||||||
__asm__("rolq %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
|
__asm__("rolq %b[shift], %[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
#else /* __x86_64__ */
|
#else /* __x86_64__ */
|
||||||
|
@ -1271,7 +1271,7 @@ __INTRIN_INLINE unsigned short __cdecl _rotr16(unsigned short value, unsigned ch
|
||||||
__INTRIN_INLINE unsigned long long _rotr64(unsigned long long value, int shift)
|
__INTRIN_INLINE unsigned long long _rotr64(unsigned long long value, int shift)
|
||||||
{
|
{
|
||||||
unsigned long long retval;
|
unsigned long long retval;
|
||||||
__asm__("rorq %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
|
__asm__("rorq %b[shift], %[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
#else /* __x86_64__ */
|
#else /* __x86_64__ */
|
||||||
|
|
Loading…
Reference in a new issue