aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-06-29 18:31:45 +0200
committerMichael Matz <matz@suse.de>2016-12-15 17:47:07 +0100
commit253afeed1e822965804c0f5503bac057e68f08e8 (patch)
tree7cb211c05e6dd775a3ed06ee48739286778d7738 /tccasm.c
parent63e3ff7cca5437518f540261b34170ce80a47686 (diff)
downloadtinycc-253afeed1e822965804c0f5503bac057e68f08e8.tar.gz
tinycc-253afeed1e822965804c0f5503bac057e68f08e8.tar.bz2
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.
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c5
1 files changed, 4 insertions, 1 deletions
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)