aboutsummaryrefslogtreecommitdiff
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/tcctest.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c
index 41a9a10..9230020 100644
--- a/tests/tcctest.c
+++ b/tests/tcctest.c
@@ -2600,6 +2600,14 @@ int fls64(unsigned long long x)
}
#endif
+void other_constraints_test(void)
+{
+ unsigned long ret;
+ int var;
+ __asm__ volatile ("movq %P1,%0" : "=r" (ret) : "p" (&var));
+ printf ("oc1: %d\n", ret == (unsigned long)&var);
+}
+
unsigned int set;
void asm_test(void)
@@ -2633,6 +2641,7 @@ void asm_test(void)
s1.b = 43;
printf("mconstraint: %d", mconstraint_test(&s2));
printf(" %d %d\n", s1.a, s1.b);
+ other_constraints_test();
set = 0xff;
sigdelset1(&set, 2);
sigaddset1(&set, 16);