From 253afeed1e822965804c0f5503bac057e68f08e8 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 29 Jun 2016 18:31:45 +0200 Subject: 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. --- tccasm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tccasm.c') diff --git a/tccasm.c b/tccasm.c index 6a46417..b3e9eb4 100644 --- a/tccasm.c +++ b/tccasm.c @@ -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) -- cgit v1.3.1