diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-05-26 22:04:20 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-05-26 22:04:20 +0200 |
commit | b4a08d0815342b6238d307864f0823d0f07bb691 (patch) | |
tree | 85f48254ca79a6e2bc9d7359017a5731f98f897f /test/monniaux/math | |
parent | 490a6caea1a95cfdbddf7aca244fa6a1c83aa9a2 (diff) | |
download | compcert-kvx-b4a08d0815342b6238d307864f0823d0f07bb691.tar.gz compcert-kvx-b4a08d0815342b6238d307864f0823d0f07bb691.zip |
k1c -> kvx changes
Diffstat (limited to 'test/monniaux/math')
-rw-r--r-- | test/monniaux/math/exceptions.c | 6 | ||||
-rw-r--r-- | test/monniaux/math/rounding.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/monniaux/math/exceptions.c b/test/monniaux/math/exceptions.c index 72107066..84ed54db 100644 --- a/test/monniaux/math/exceptions.c +++ b/test/monniaux/math/exceptions.c @@ -4,16 +4,16 @@ #pragma STDC FENV_ACCESS ON -#if defined(__K1C__) && !defined(__COMPCERT__) +#if defined(__KVX__) && !defined(__COMPCERT__) int fetestexcept(int excepts) { int mask = (K1_SFR_CS_IO_MASK | K1_SFR_CS_DZ_MASK | K1_SFR_CS_OV_MASK | K1_SFR_CS_UN_MASK | K1_SFR_CS_IN_MASK) & excepts; - unsigned long long cs = __builtin_k1_get(K1_SFR_CS); + unsigned long long cs = __builtin_kvx_get(K1_SFR_CS); return cs & mask; } int feclearexcept(int excepts) { int mask = (K1_SFR_CS_IO_MASK | K1_SFR_CS_DZ_MASK | K1_SFR_CS_OV_MASK | K1_SFR_CS_UN_MASK | K1_SFR_CS_IN_MASK) & excepts; - __builtin_k1_wfxl(K1_SFR_CS, mask); + __builtin_kvx_wfxl(K1_SFR_CS, mask); return 0; } #endif diff --git a/test/monniaux/math/rounding.c b/test/monniaux/math/rounding.c index c2ce85e3..3ac8faf0 100644 --- a/test/monniaux/math/rounding.c +++ b/test/monniaux/math/rounding.c @@ -1,18 +1,18 @@ #include <stdio.h> #include <fenv.h> -#ifdef __K1C__ -#include <mppa_bare_runtime/k1c/registers.h> +#ifdef __KVX__ +#include <mppa_bare_runtime/kvx/registers.h> int fesetround(int rounding_mode) { if (rounding_mode < 0 || rounding_mode > 3) return 1; - unsigned long long cs = __builtin_k1_get(K1_SFR_CS); + unsigned long long cs = __builtin_kvx_get(K1_SFR_CS); cs = (cs & ~(3 << 16)) | (rounding_mode << 16); - __builtin_k1_set(K1_SFR_CS, cs); + __builtin_kvx_set(K1_SFR_CS, cs); return 0; } int fegetround(void) { - unsigned long long cs = __builtin_k1_get(K1_SFR_CS); + unsigned long long cs = __builtin_kvx_get(K1_SFR_CS); return (cs >> 16) & 3; } #endif |