From 03ab00aec5d10f4a2d048fab7f16489cf33fcc1d Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Mon, 24 Oct 2016 14:21:51 +0200 Subject: 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. --- test/regression/extasm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test/regression/extasm.c') 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)); -- cgit