diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2018-08-20 11:02:13 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2018-08-20 11:04:17 +0200 |
commit | b9a6a50546222269bb9445d0d21d948028b2720a (patch) | |
tree | 10c9e6d41ae2baf91b80841cc161ec884aea9f8e /test/regression/extasm.c | |
parent | e9b5632617b1477603883aab543994e2a1c464ce (diff) | |
download | compcert-b9a6a50546222269bb9445d0d21d948028b2720a.tar.gz compcert-b9a6a50546222269bb9445d0d21d948028b2720a.zip |
Harden the extasm.c test
Pass more info from CompCert's configuration as #define on command line.
Use this info to improve the "64 bit" detection in extasm.c.
(Before it fails with powerpc-ppc64, which has 64-bit int regs but
couldn't be detected with #ifdefs.)
Diffstat (limited to 'test/regression/extasm.c')
-rw-r--r-- | test/regression/extasm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/regression/extasm.c b/test/regression/extasm.c index a41c4202..03b03157 100644 --- a/test/regression/extasm.c +++ b/test/regression/extasm.c @@ -18,7 +18,10 @@ int clobbers(int x, int z) return y + z; } -#if defined(__x86_64__) || __riscv_xlen == 64 +#if (COMPCERT_ARCH==x86 && COMPCERT_MODEL==64) \ + || (COMPCERT_ARCH==riscV && COMPCERT_MODEL==64) \ + || (COMPCERT_ARCH==powerpc && COMPCERT_MODEL==ppc64) \ + || (COMPCERT_ARCH==powerpc && COMPCERT_MODEL==e5500) #define SIXTYFOUR #else #undef SIXTYFOUR |