aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/unittest
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-01-11 11:41:09 +0100
committerCyril SIX <cyril.six@kalray.eu>2019-01-11 11:41:09 +0100
commitf8caf5f7564886dc43246c7477c4c22a7572e60d (patch)
tree44b1b2b7f245fcd3874b881a96fb7c846138218f /mppa_k1c/unittest
parentb75492e6a8135b35ef8846fbeed1e91678a2c7f0 (diff)
downloadcompcert-kvx-f8caf5f7564886dc43246c7477c4c22a7572e60d.tar.gz
compcert-kvx-f8caf5f7564886dc43246c7477c4c22a7572e60d.zip
[BROKEN] trying to link the test in mppa_k1c/unittest/postpass_test
Diffstat (limited to 'mppa_k1c/unittest')
-rw-r--r--mppa_k1c/unittest/Makefile12
-rw-r--r--mppa_k1c/unittest/postpass_test.ml12
2 files changed, 24 insertions, 0 deletions
diff --git a/mppa_k1c/unittest/Makefile b/mppa_k1c/unittest/Makefile
new file mode 100644
index 00000000..fc7a51ac
--- /dev/null
+++ b/mppa_k1c/unittest/Makefile
@@ -0,0 +1,12 @@
+# Needs to be called from CompCert root directory
+# $ make -f mppa_k1c/unittest/Makefile postpass_test
+
+include Makefile.extr
+
+TEST_CMX=mppa_k1c/unittest/postpass_test.cmx
+
+UNITTEST_OBJS:=$(shell $(MODORDER) $(TEST_CMX))
+
+postpass_test: $(TEST_CMX) $(UNITTEST_OBJS)
+ @echo "Linking $@"
+ @$(OCAMLOPT) -o $@ $(LIBS) $(LINK_OPT) $+
diff --git a/mppa_k1c/unittest/postpass_test.ml b/mppa_k1c/unittest/postpass_test.ml
new file mode 100644
index 00000000..434bfaf7
--- /dev/null
+++ b/mppa_k1c/unittest/postpass_test.ml
@@ -0,0 +1,12 @@
+open Printf
+open Asmblock
+open Integers
+open PostpassSchedulingOracle
+open BinNums
+
+let test_schedule_sd =
+ let sd_inst = PStore (PStoreRRO (Psd, GPR12, GPR16, (Ofsimm (Ptrofs.of_int @@ Int.intval Z0))))
+ in let bb = { header = []; body = [sd_inst]; exit = None }
+ in List.iter print_bb (smart_schedule bb)
+
+let _ = test_schedule_sd; printf "Done\n"