diff options
Diffstat (limited to 'riscV/SelectOp.vp')
-rw-r--r-- | riscV/SelectOp.vp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/riscV/SelectOp.vp b/riscV/SelectOp.vp index 0596ebf6..0e82f8ba 100644 --- a/riscV/SelectOp.vp +++ b/riscV/SelectOp.vp @@ -421,11 +421,17 @@ Definition floatofsingle (e: expr) := Eop Ofloatofsingle (e ::: Enil). Definition select (ty: typ) (cond: condition) (args: exprlist) (e1 e2: expr) : option expr - := match ty with + := if Archi.ptr64 then + match ty with | Tlong => Some (Eop Oselectl ((Eop (Ocmp cond) args) ::: e1 ::: e2 ::: Enil)) + | Tint => Some (Eop Olowlong ((Eop Oselectl + ((Eop (Ocmp cond) args) ::: + (Eop Ocast32signed (e1 ::: Enil)) ::: + (Eop Ocast32signed (e2 ::: Enil)) ::: Enil)) ::: Enil)) | _ => None - end. + end + else None. (** ** Recognition of addressing modes for load and store operations *) |