aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/mppa_k1c
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-28 23:47:44 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-28 23:47:44 +0200
commit436658966209181c8f365cc8d1a69e8487852d17 (patch)
tree7543cad675c2d036f96c58306de5f396134933af /runtime/mppa_k1c
parenta789b94e986375a713263d7d7584ceaac01084f2 (diff)
downloadcompcert-kvx-436658966209181c8f365cc8d1a69e8487852d17.tar.gz
compcert-kvx-436658966209181c8f365cc8d1a69e8487852d17.zip
fixes for COS
Diffstat (limited to 'runtime/mppa_k1c')
-rw-r--r--runtime/mppa_k1c/i64_sdiv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/mppa_k1c/i64_sdiv.c b/runtime/mppa_k1c/i64_sdiv.c
index 9feab791..892aac07 100644
--- a/runtime/mppa_k1c/i64_sdiv.c
+++ b/runtime/mppa_k1c/i64_sdiv.c
@@ -10,7 +10,17 @@ int i32_sdiv (int a, int b)
return __divdi3 (a, b);
}
+#ifdef __K1C_COS__
+#include <hal/cos_registers.h>
+#define K1_SFR_CS_IO_MASK COS_SFR_CS_IO_MASK
+#define K1_SFR_CS_DZ_MASK COS_SFR_CS_DZ_MASK
+#define K1_SFR_CS_OV_MASK COS_SFR_CS_OV_MASK
+#define K1_SFR_CS_UN_MASK COS_SFR_CS_UN_MASK
+#define K1_SFR_CS_IN_MASK COS_SFR_CS_IN_MASK
+#define K1_SFR_CS COS_SFR_CS
+#else
#include <mppa_bare_runtime/k1c/registers.h>
+#endif
/* DM FIXME this is for floating point */
int fetestexcept(int excepts) {