diff options
author | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2019-05-26 18:44:46 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2019-05-26 18:44:46 +0200 |
commit | c36514ac4b05f78dd2e02fab3f8886cab8234925 (patch) | |
tree | 2c3cc9281942d801a0b889e2452bd59c92815cf7 /powerpc/SelectOp.vp | |
parent | 546ca4827a033210d8cd94fe72721c7b0b364e11 (diff) | |
download | compcert-kvx-c36514ac4b05f78dd2e02fab3f8886cab8234925.tar.gz compcert-kvx-c36514ac4b05f78dd2e02fab3f8886cab8234925.zip |
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.
Diffstat (limited to 'powerpc/SelectOp.vp')
-rw-r--r-- | powerpc/SelectOp.vp | 11 |
1 files changed, 11 insertions, 0 deletions
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 := |