inline asm: Accept 'p' constraint and 'P' template mod

'p' is conservatively the same as 'r' and 'P' as template
modifier can be ignored in TCC.
This commit is contained in:
Michael Matz
2016-06-29 18:31:45 +02:00
parent 63e3ff7cca
commit 253afeed1e
3 changed files with 15 additions and 1 deletions

View File

@ -991,7 +991,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')
*str == 'h' || *str == 'k' || *str == 'q' ||
/* P in GCC would add "@PLT" to symbol refs in PIC mode
Ignore this in TCC. */
*str == 'P')
modifier = *str++;
index = find_constraint(operands, nb_operands, str, &str);
if (index < 0)