diff options
Diffstat (limited to 'tests/tcctest.c')
| -rw-r--r-- | tests/tcctest.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c index 496de3a..22d9e88 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -2914,6 +2914,11 @@ void fancy_copy (unsigned *in, unsigned *out) asm volatile ("" : "=r" (*out) : "0" (*in)); } +void fancy_copy2 (unsigned *in, unsigned *out) +{ + asm volatile ("mov %0,(%1)" : : "r" (*in), "r" (out) : "memory"); +} + void asm_test(void) { char buf[128]; @@ -2987,6 +2992,9 @@ void asm_test(void) val = 43; fancy_copy (&val, &val2); printf ("fancycpy(%d)=%d\n", val, val2); + val = 44; + fancy_copy2 (&val, &val2); + printf ("fancycpy2(%d)=%d\n", val, val2); return; label1: goto label2; |
