aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-11-19 13:32:09 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-11-19 13:32:09 +0000
commitef40c6d36f1c3125f3aa78ea4eaa61dcc7bcae67 (patch)
tree7bd176bb0dbf60617954fabadd8aedc64b4cf647 /cfrontend
parentcdf83055d96e2af784a97c783c94b83ba2032ae1 (diff)
downloadcompcert-kvx-ef40c6d36f1c3125f3aa78ea4eaa61dcc7bcae67.tar.gz
compcert-kvx-ef40c6d36f1c3125f3aa78ea4eaa61dcc7bcae67.zip
Revised lib/Integers.v to make it parametric w.r.t. word size.
Introduced Int.iwordsize and used it in place of "Int.repr 32" or "Int.repr (Z_of_nat wordsize)". git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1182 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend')
-rw-r--r--cfrontend/Cminorgenproof.v6
-rw-r--r--cfrontend/Csem.v6
2 files changed, 6 insertions, 6 deletions
diff --git a/cfrontend/Cminorgenproof.v b/cfrontend/Cminorgenproof.v
index 5eaf46b2..a472e709 100644
--- a/cfrontend/Cminorgenproof.v
+++ b/cfrontend/Cminorgenproof.v
@@ -939,11 +939,11 @@ Proof.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
- destruct (Int.ltu i0 (Int.repr 32)); inv H1. TrivialOp.
+ destruct (Int.ltu i0 Int.iwordsize); inv H1. TrivialOp.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
- destruct (Int.ltu i0 (Int.repr 32)); inv H1. TrivialOp.
+ destruct (Int.ltu i0 Int.iwordsize); inv H1. TrivialOp.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
- destruct (Int.ltu i0 (Int.repr 32)); inv H1. TrivialOp.
+ destruct (Int.ltu i0 Int.iwordsize); inv H1. TrivialOp.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
inv H0; try discriminate; inv H1; inv H; TrivialOp.
diff --git a/cfrontend/Csem.v b/cfrontend/Csem.v
index ee134875..62e9dc70 100644
--- a/cfrontend/Csem.v
+++ b/cfrontend/Csem.v
@@ -252,7 +252,7 @@ Function sem_xor (v1 v2: val): option val :=
Function sem_shl (v1 v2: val): option val :=
match v1, v2 with
| Vint n1, Vint n2 =>
- if Int.ltu n2 (Int.repr 32) then Some (Vint(Int.shl n1 n2)) else None
+ if Int.ltu n2 Int.iwordsize then Some (Vint(Int.shl n1 n2)) else None
| _, _ => None
end.
@@ -261,13 +261,13 @@ Function sem_shr (v1: val) (t1: type) (v2: val) (t2: type): option val :=
| shr_case_I32unsi =>
match v1,v2 with
| Vint n1, Vint n2 =>
- if Int.ltu n2 (Int.repr 32) then Some (Vint (Int.shru n1 n2)) else None
+ if Int.ltu n2 Int.iwordsize then Some (Vint (Int.shru n1 n2)) else None
| _,_ => None
end
| shr_case_ii =>
match v1,v2 with
| Vint n1, Vint n2 =>
- if Int.ltu n2 (Int.repr 32) then Some (Vint (Int.shr n1 n2)) else None
+ if Int.ltu n2 Int.iwordsize then Some (Vint (Int.shr n1 n2)) else None
| _, _ => None
end
| shr_default=>