aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-09-18 18:27:33 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-09-18 18:27:33 +0200
commit62063b60892dea2e52b32c426bdd481816f24b7f (patch)
tree07d02f8749d3bb6bf72136821572d4f9dfce42fe
parent932f7f853fdad81c2bdc9db42ed87d106db5762f (diff)
downloadcompcert-kvx-62063b60892dea2e52b32c426bdd481816f24b7f.tar.gz
compcert-kvx-62063b60892dea2e52b32c426bdd481816f24b7f.zip
bogus OpWeights for Risc-V
-rwxr-xr-xconfig_rv32.sh2
-rw-r--r--riscV/OpWeights.ml19
2 files changed, 20 insertions, 1 deletions
diff --git a/config_rv32.sh b/config_rv32.sh
index a5a5cf1c..654cacfa 100755
--- a/config_rv32.sh
+++ b/config_rv32.sh
@@ -1 +1 @@
-exec ./config_simple.sh rv32-linux --toolprefix riscv64-linux-gnu- "$@"
+exec ./config_simple.sh rv32-linux --toolprefix riscv64-unknown-elf- "$@"
diff --git a/riscV/OpWeights.ml b/riscV/OpWeights.ml
new file mode 100644
index 00000000..3662ef1c
--- /dev/null
+++ b/riscV/OpWeights.ml
@@ -0,0 +1,19 @@
+open Op;;
+let resource_bounds = [| 1 |];;
+
+
+let latency_of_op (op : operation) (nargs : int) = 1;;
+
+let resources_of_op (op : operation) (nargs : int) = [| 1 |];;
+
+let resources_of_cond (cond : condition) (nargs : int) = [| 1 |];;
+
+let latency_of_load trap chunk (addr : addressing) (nargs : int) = 3;;
+let latency_of_call _ _ = 6;;
+
+let resources_of_load trap chunk addressing nargs = [| 1 |];;
+
+let resources_of_store chunk addressing nargs = [| 1 |];;
+
+let resources_of_call _ _ = resource_bounds;;
+let resources_of_builtin _ = resource_bounds;;