diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-12-08 09:32:48 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-12-08 09:32:48 +0100 |
commit | 766968b709e5248a6aac6fdb92f6228be05fc70c (patch) | |
tree | 792c7fc4651dd0bf98b6697305e0eb3a006be854 /powerpc/SelectOp.vp | |
parent | a100edde18de43cf933c0d53467e196541436e13 (diff) | |
parent | cb93a301fd2ddae3071ae0838290b201496d90ef (diff) | |
download | compcert-kvx-766968b709e5248a6aac6fdb92f6228be05fc70c.tar.gz compcert-kvx-766968b709e5248a6aac6fdb92f6228be05fc70c.zip |
Merge remote-tracking branch 'origin/kvx-work' into kvx-better2-cse3
Diffstat (limited to 'powerpc/SelectOp.vp')
-rw-r--r-- | powerpc/SelectOp.vp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/powerpc/SelectOp.vp b/powerpc/SelectOp.vp index 52f4f855..fe8b5453 100644 --- a/powerpc/SelectOp.vp +++ b/powerpc/SelectOp.vp @@ -468,7 +468,7 @@ Definition intoffloat (e: expr) := Eop Ointoffloat (e ::: Enil). Definition intuoffloat (e: expr) := if Archi.ppc64 then - Eop Ointuoffloat (e ::: Enil) + Eop Olowlong (Eop Olongoffloat (e ::: Enil) ::: Enil) else Elet e (Elet (Eop (Ofloatconst (Float.of_intu Float.ox8000_0000)) Enil) @@ -482,7 +482,8 @@ Nondetfunction floatofintu (e: expr) := Eop (Ofloatconst (Float.of_intu n)) Enil | _ => if Archi.ppc64 then - Eop Ofloatofintu (e ::: Enil) else + Eop Ofloatoflong (Eop Ocast32unsigned (e ::: Enil) ::: Enil) + else subf (Eop Ofloatofwords (Eop (Ointconst Float.ox4330_0000) Enil ::: e ::: Enil)) (Eop (Ofloatconst (Float.from_words Float.ox4330_0000 Int.zero)) Enil) end. @@ -493,7 +494,8 @@ Nondetfunction floatofint (e: expr) := Eop (Ofloatconst (Float.of_int n)) Enil | _ => if Archi.ppc64 then - Eop Ofloatofint (e ::: Enil) else + Eop Ofloatoflong (Eop Ocast32signed (e ::: Enil) ::: Enil) + else subf (Eop Ofloatofwords (Eop (Ointconst Float.ox4330_0000) Enil ::: addimm Float.ox8000_0000 e ::: Enil)) (Eop (Ofloatconst (Float.from_words Float.ox4330_0000 Float.ox8000_0000)) Enil) |