[CRT/INTRINSICS]

Timo Kreuzer:
* Change inline assembly constraint from "r" to "q". "r" means any kind of register, including *si and *di, these cannot be used for 8bit operations on x86, only x64 has sil, dil registers. But gcc is stupid and doesn't get that if we don't tell it explicitly, by using "q", which will only allow a, b, c, d registers. Fixes an assembler error messages that can occur under certain circumstances.

svn path=/trunk/; revision=52100
This commit is contained in:
Amine Khaldi 2011-06-05 20:59:09 +00:00
parent b6d8950a07
commit 09284f5d66

View file

@ -911,7 +911,7 @@ __INTRIN_INLINE unsigned int _rotr(unsigned int value, int shift)
__INTRIN_INLINE unsigned char _rotr8(unsigned char value, unsigned char shift)
{
unsigned char retval;
__asm__("rorb %b[shift], %b[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
__asm__("rorb %b[shift], %b[retval]" : [retval] "=qm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}