diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2019-12-13 18:16:06 +0100 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2019-12-21 10:34:53 +0100 |
commit | 4dfcd7d4be18e8bc437ca170782212aa06635a95 (patch) | |
tree | a0dfa75b91b24d82c0864fb7ecc9bed9c5cc73a0 /x86 | |
parent | 54fb9faab6a53fad126fd57c3d58b232ff181cd1 (diff) | |
download | compcert-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 'x86')
-rw-r--r-- | x86/Asm.v | 2 | ||||
-rw-r--r-- | x86/Asmexpand.ml | 3 | ||||
-rw-r--r-- | x86/CBuiltins.ml | 3 | ||||
-rw-r--r-- | x86/TargetPrinter.ml | 2 |
4 files changed, 0 insertions, 10 deletions
@@ -284,7 +284,6 @@ Inductive instruction: Type := | Pmovsb | Pmovsw | Pmovw_rm (rd: ireg) (ad: addrmode) - | Pnop | Prep_movsl | Psbbl_rr (rd: ireg) (r2: ireg) | Psqrtsd (rd: freg) (r1: freg) @@ -1003,7 +1002,6 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out | Pmovsb | Pmovsw | Pmovw_rm _ _ - | Pnop | Prep_movsl | Psbbl_rr _ _ | Psqrtsd _ _ diff --git a/x86/Asmexpand.ml b/x86/Asmexpand.ml index 16426ce3..5cf52b5e 100644 --- a/x86/Asmexpand.ml +++ b/x86/Asmexpand.ml @@ -473,9 +473,6 @@ let expand_builtin_inline name args res = (* Synchronization *) | "__builtin_membar", [], _ -> () - (* no operation *) - | "__builtin_nop", [], _ -> - emit Pnop (* Catch-all *) | _ -> raise (Error ("unrecognized builtin " ^ name)) diff --git a/x86/CBuiltins.ml b/x86/CBuiltins.ml index f4f40a31..e7f714c7 100644 --- a/x86/CBuiltins.ml +++ b/x86/CBuiltins.ml @@ -73,9 +73,6 @@ let builtins = { (TVoid [], [TPtr(TInt(IUShort, []), []); TInt(IUShort, [])], false); "__builtin_write32_reversed", (TVoid [], [TPtr(TInt(IUInt, []), []); TInt(IUInt, [])], false); - (* no operation *) - "__builtin_nop", - (TVoid [], [], false); ] } diff --git a/x86/TargetPrinter.ml b/x86/TargetPrinter.ml index 6159437e..30468fac 100644 --- a/x86/TargetPrinter.ml +++ b/x86/TargetPrinter.ml @@ -797,8 +797,6 @@ module Target(System: SYSTEM):TARGET = fprintf oc " movsw\n"; | Pmovw_rm (rd, a) -> fprintf oc " movw %a, %a\n" addressing a ireg16 rd - | Pnop -> - fprintf oc " nop\n" | Prep_movsl -> fprintf oc " rep movsl\n" | Psbbl_rr (res,a1) -> |