inline asm: Fix 'P' and accept some r<nr> registers

A 'P' template modifier should avoid adding a '$' to literal
arguments.  Also accept the numbered r8+ registers in an inline
asm clobber list (ignoring them for now).
This commit is contained in:
Michael Matz
2016-07-11 16:28:48 +02:00
parent 10c3514889
commit f9423ff3fa
2 changed files with 13 additions and 5 deletions

View File

@ -1043,10 +1043,10 @@ static void subst_asm_operands(ASMOperand *operands, int nb_operands,
}
modifier = 0;
if (*str == 'c' || *str == 'n' ||
*str == 'b' || *str == 'w' ||
*str == 'h' || *str == 'k' || *str == 'q' ||
/* P in GCC would add "@PLT" to symbol refs in PIC mode
Ignore this in TCC. */
*str == 'b' || *str == 'w' || *str == 'h' || *str == 'k' ||
*str == 'q' ||
/* P in GCC would add "@PLT" to symbol refs in PIC mode,
and make literal operands not be decorated with '$'. */
*str == 'P')
modifier = *str++;
index = find_constraint(operands, nb_operands, str, &str);