From c36514ac4b05f78dd2e02fab3f8886cab8234925 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sun, 26 May 2019 18:44:46 +0200 Subject: PowerPC: add SelectOp.select function This function and its proof should have been part of commit 43e7b67. They are already there for the other ports. --- powerpc/SelectOp.vp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'powerpc/SelectOp.vp') diff --git a/powerpc/SelectOp.vp b/powerpc/SelectOp.vp index d2ca408a..41bc0efc 100644 --- a/powerpc/SelectOp.vp +++ b/powerpc/SelectOp.vp @@ -516,6 +516,17 @@ Definition singleofintu (e: expr) := Definition singleoffloat (e: expr) := Eop Osingleoffloat (e ::: Enil). Definition floatofsingle (e: expr) := Eop Ofloatofsingle (e ::: Enil). +(** ** Selection *) + +Definition select (ty: typ) (cond: condition) (args: exprlist) (e1 e2: expr) := + if match ty with + | Tint => true + | Tlong => Archi.ppc64 + | _ => false + end + then Some (Eop (Osel cond ty) (e1 ::: e2 ::: args)) + else None. + (** ** Recognition of addressing modes for load and store operations *) Definition can_use_Aindexed2 (chunk: memory_chunk): bool := -- cgit