aboutsummaryrefslogtreecommitdiffstats
path: root/riscV
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2019-12-13 18:16:06 +0100
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-12-21 10:34:53 +0100
commit4dfcd7d4be18e8bc437ca170782212aa06635a95 (patch)
treea0dfa75b91b24d82c0864fb7ecc9bed9c5cc73a0 /riscV
parent54fb9faab6a53fad126fd57c3d58b232ff181cd1 (diff)
downloadcompcert-4dfcd7d4be18e8bc437ca170782212aa06635a95.tar.gz
compcert-4dfcd7d4be18e8bc437ca170782212aa06635a95.zip
Remove `__builtin_nop` for some architectures. (#208)
The `__builtin_nop` function is documented only for PowerPC. It was added to the other architectures by copy paste, but has no known uses. So, remove `__builtin_nop` from all architectures but PowerPC.
Diffstat (limited to 'riscV')
-rw-r--r--riscV/Asm.v4
-rw-r--r--riscV/Asmexpand.ml2
-rw-r--r--riscV/TargetPrinter.ml2
3 files changed, 1 insertions, 7 deletions
diff --git a/riscV/Asm.v b/riscV/Asm.v
index dc410a3b..50caab12 100644
--- a/riscV/Asm.v
+++ b/riscV/Asm.v
@@ -344,8 +344,7 @@ Inductive instruction : Type :=
| Ploadsi (rd: freg) (f: float32) (**r load an immediate single *)
| Pbtbl (r: ireg) (tbl: list label) (**r N-way branch through a jump table *)
| Pbuiltin: external_function -> list (builtin_arg preg)
- -> builtin_res preg -> instruction (**r built-in function (pseudo) *)
- | Pnop : instruction. (**r nop instruction *)
+ -> builtin_res preg -> instruction. (**r built-in function (pseudo) *)
(** The pseudo-instructions are the following:
@@ -986,7 +985,6 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
| Pfmsubd _ _ _ _
| Pfnmaddd _ _ _ _
| Pfnmsubd _ _ _ _
- | Pnop
=> Stuck
end.
diff --git a/riscV/Asmexpand.ml b/riscV/Asmexpand.ml
index 3e734747..3c1ef39f 100644
--- a/riscV/Asmexpand.ml
+++ b/riscV/Asmexpand.ml
@@ -468,8 +468,6 @@ let expand_builtin_inline name args res =
(fun rl ->
emit (Pmulw (rl, X a, X b));
emit (Pmulhuw (rh, X a, X b)))
- | "__builtin_nop", [], _ ->
- emit Pnop
(* Catch-all *)
| _ ->
raise (Error ("unrecognized builtin " ^ name))
diff --git a/riscV/TargetPrinter.ml b/riscV/TargetPrinter.ml
index 64bcea4c..9cd8236c 100644
--- a/riscV/TargetPrinter.ml
+++ b/riscV/TargetPrinter.ml
@@ -564,8 +564,6 @@ module Target : TARGET =
fprintf oc " jr x5\n";
jumptables := (lbl, tbl) :: !jumptables;
fprintf oc "%s end pseudoinstr btbl\n" comment
- | Pnop ->
- fprintf oc " nop\n"
| Pbuiltin(ef, args, res) ->
begin match ef with
| EF_annot(kind,txt, targs) ->