aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/Machregs.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2019-04-12 15:47:49 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-05-20 18:00:46 +0200
commite9cca9c8166fadb16c64df0fbb0b9ca640c0f594 (patch)
tree58fe5d8dd5d7e39c99539b35f983b6d22ceac9d9 /powerpc/Machregs.v
parent5b7fc96afb149ad916a9bf5015fe1eb2e0baaa7c (diff)
downloadcompcert-kvx-e9cca9c8166fadb16c64df0fbb0b9ca640c0f594.tar.gz
compcert-kvx-e9cca9c8166fadb16c64df0fbb0b9ca640c0f594.zip
PowerPC: make sure evaluation of conditions do not destroy any register
This will be useful to implement a "select" (conditional move) operation later. - Introduce `Asmgen.loadimm64_notemp` to load a 64-bit integer constant into a register without going through memory and without needing a temporary register. - Use `Asmgen.loadimm64_notemp` instead of `Asmgen.loadimm64` in the compilation of conditions, so that GPR12 is no longer needed as a temporary. - Share code and proofs common to the two `Asmgen.loadimm64_` functions as the `Asmgen.loadimm64_32s` function.
Diffstat (limited to 'powerpc/Machregs.v')
-rw-r--r--powerpc/Machregs.v6
1 files changed, 1 insertions, 5 deletions
diff --git a/powerpc/Machregs.v b/powerpc/Machregs.v
index 53d99e2f..e7c8758b 100644
--- a/powerpc/Machregs.v
+++ b/powerpc/Machregs.v
@@ -159,11 +159,7 @@ Definition register_by_name (s: string) : option mreg :=
(** ** Destroyed registers, preferred registers *)
-Definition destroyed_by_cond (cond: condition): list mreg :=
- match cond with
- | Ccomplimm _ _ | Ccompluimm _ _ => R12 :: nil
- | _ => nil
- end.
+Definition destroyed_by_cond (cond: condition): list mreg := nil.
Definition destroyed_by_op (op: operation): list mreg :=
match op with