forked from Mirrors/tinycc
x86-asm: Accept 'q' modifier
In inline extended asm '%q1' refers to the 64bit register of operand 1.master
parent
8531de319a
commit
d5d881d9e9
2
tccasm.c
2
tccasm.c
|
@ -946,7 +946,7 @@ static void subst_asm_operands(ASMOperand *operands, int nb_operands,
|
||||||
modifier = 0;
|
modifier = 0;
|
||||||
if (*str == 'c' || *str == 'n' ||
|
if (*str == 'c' || *str == 'n' ||
|
||||||
*str == 'b' || *str == 'w' ||
|
*str == 'b' || *str == 'w' ||
|
||||||
*str == 'h' || *str == 'k')
|
*str == 'h' || *str == 'k' || *str == 'q')
|
||||||
modifier = *str++;
|
modifier = *str++;
|
||||||
index = find_constraint(operands, nb_operands, str, &str);
|
index = find_constraint(operands, nb_operands, str, &str);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
|
|
|
@ -2584,6 +2584,17 @@ unsigned long mconstraint_test(struct struct1231 *r)
|
||||||
return ret + a[0];
|
return ret + a[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
int fls64(unsigned long long x)
|
||||||
|
{
|
||||||
|
int bitpos = -1;
|
||||||
|
asm("bsrq %1,%q0"
|
||||||
|
: "+r" (bitpos)
|
||||||
|
: "rm" (x));
|
||||||
|
return bitpos + 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned int set;
|
unsigned int set;
|
||||||
|
|
||||||
void asm_test(void)
|
void asm_test(void)
|
||||||
|
|
Loading…
Reference in New Issue