aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2018-05-21 16:34:36 +0200
committerCyril SIX <cyril.six@kalray.eu>2018-05-21 16:39:48 +0200
commit479aacd0254605942a3f48c3b8053af4d07f0f6c (patch)
tree7ddbddf078b86a30e693ae35721e08f54a0af11e /test/mppa
parentb81dbb863781a5f450cad0b01f90f729fb1a2244 (diff)
downloadcompcert-kvx-479aacd0254605942a3f48c3b8053af4d07f0f6c.tar.gz
compcert-kvx-479aacd0254605942a3f48c3b8053af4d07f0f6c.zip
MPPA - Added modulo and division 64 bits. Non certified
32 bits version are not yet there. Right now the code is directly from libgcc, compiled with k1-gcc because of builtins.
Diffstat (limited to 'test/mppa')
-rw-r--r--test/mppa/Makefile2
-rw-r--r--test/mppa/general/udivd.c8
-rw-r--r--test/mppa/general/umodd.c8
3 files changed, 17 insertions, 1 deletions
diff --git a/test/mppa/Makefile b/test/mppa/Makefile
index ffea4c30..5b312475 100644
--- a/test/mppa/Makefile
+++ b/test/mppa/Makefile
@@ -17,7 +17,7 @@ nobin: $(ASM)
$(DIR)/$(BINDIR)/%.bin: $(DIR)/$(ASMDIR)/%.s
@mkdir -p $(@D)
- k1-gcc $< -o $@
+ ccomp $< -o $@
.SECONDARY:
$(DIR)/$(ASMDIR)/%.s: $(DIR)/%.c $(CCOMP)
diff --git a/test/mppa/general/udivd.c b/test/mppa/general/udivd.c
new file mode 100644
index 00000000..03e103a6
--- /dev/null
+++ b/test/mppa/general/udivd.c
@@ -0,0 +1,8 @@
+#define TYPE unsigned long long
+
+int main(void){
+ TYPE a = 6;
+ TYPE b = -4;
+
+ return a/b;
+}
diff --git a/test/mppa/general/umodd.c b/test/mppa/general/umodd.c
new file mode 100644
index 00000000..96d2b564
--- /dev/null
+++ b/test/mppa/general/umodd.c
@@ -0,0 +1,8 @@
+#define TYPE unsigned long long
+
+int main(void){
+ TYPE a = 6;
+ TYPE b = -4;
+
+ return a%b;
+}