aboutsummaryrefslogtreecommitdiff
path: root/i386-asm.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 /i386-asm.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 'i386-asm.c')
-rw-r--r--i386-asm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/i386-asm.c b/i386-asm.c
index 064b8aa..e532911 100644
--- a/i386-asm.c
+++ b/i386-asm.c
@@ -1002,6 +1002,7 @@ static inline int constraint_priority(const char *str)
pr = 2;
break;
case 'r':
+ case 'p':
pr = 3;
break;
case 'N':
@@ -1170,6 +1171,7 @@ ST_FUNC void asm_compute_constraints(ASMOperand *operands,
}
goto try_next;
case 'r':
+ case 'p': /* A general address, for x86(64) any register is acceptable*/
/* any general register */
for(reg = 0; reg < 8; reg++) {
if (!is_reg_allocated(reg))