diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2016-10-24 14:21:51 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2016-10-24 14:34:59 +0200 |
commit | 03ab00aec5d10f4a2d048fab7f16489cf33fcc1d (patch) | |
tree | 16d5313fb0d61585f6d82c6232228d716e9f7553 /test/regression/extasm.c | |
parent | 2fc1f0ce18c45d1148493d58e0c848fc70c44a4d (diff) | |
download | compcert-03ab00aec5d10f4a2d048fab7f16489cf33fcc1d.tar.gz compcert-03ab00aec5d10f4a2d048fab7f16489cf33fcc1d.zip |
Update the tests and test infrastructure in test/regression
Tests updated to work with x86 64 bits.
Infrastructure added: script "Runtest", with ability to have different reference outputs depending on platform or bit size.
Diffstat (limited to 'test/regression/extasm.c')
-rw-r--r-- | test/regression/extasm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/regression/extasm.c b/test/regression/extasm.c index 00a1cd57..c0534047 100644 --- a/test/regression/extasm.c +++ b/test/regression/extasm.c @@ -5,7 +5,9 @@ int clobbers(int x, int z) { int y; asm("TEST0 out:%0 in:%1" : "=r"(y) : "r"(x) : "cc" -#if defined(__i386__) +#if defined(__x86_64__) + , "rax", "rdx", "rbx" +#elif defined(__i386__) , "eax", "edx", "ebx" #elif defined(__arm__) , "r0", "r1", "r4" @@ -16,6 +18,12 @@ int clobbers(int x, int z) return y + z; } +#if defined(__x86_64__) +#define SIXTYFOUR +#else +#undef SIXTYFOUR +#endif + int main() { int x; @@ -44,10 +52,12 @@ int main() asm("FAIL1 in:%0" : : "i"(x)); #endif /* 64-bit output */ +#ifndef SIXTYFOUR asm("TEST10 out: high %R0,lo %Q0" : "=r" (z)); /* 64-bit input */ asm("TEST11 out:%0 in:%1,high %R2,lo %Q2,%3" : "=r"(x) : "r"(y), "r"(z), "r"(f)); +#endif #ifdef FAILURES asm("FAIL2 out:%0" : "=r"(z)); asm("FAIL3 in:%0" : : "r"(z)); |