aboutsummaryrefslogtreecommitdiffstats
path: root/backend
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 /backend
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 'backend')
-rw-r--r--backend/Cminor.v6
-rw-r--r--backend/Selectionproof.v6
2 files changed, 6 insertions, 6 deletions
diff --git a/backend/Cminor.v b/backend/Cminor.v
index 8cc2185d..aa9c5116 100644
--- a/backend/Cminor.v
+++ b/backend/Cminor.v
@@ -276,11 +276,11 @@ Definition eval_binop
| Oor, Vint n1, Vint n2 => Some (Vint (Int.or n1 n2))
| Oxor, Vint n1, Vint n2 => Some (Vint (Int.xor n1 n2))
| Oshl, 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
| Oshr, 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
| Oshru, 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
| Oaddf, Vfloat f1, Vfloat f2 => Some (Vfloat (Float.add f1 f2))
| Osubf, Vfloat f1, Vfloat f2 => Some (Vfloat (Float.sub f1 f2))
| Omulf, Vfloat f1, Vfloat f2 => Some (Vfloat (Float.mul f1 f2))
diff --git a/backend/Selectionproof.v b/backend/Selectionproof.v
index 32f90f55..70cbeb41 100644
--- a/backend/Selectionproof.v
+++ b/backend/Selectionproof.v
@@ -253,11 +253,11 @@ Proof.
apply eval_and; auto.
apply eval_or; auto.
apply eval_xor; auto.
- caseEq (Int.ltu i0 (Int.repr 32)); intro; rewrite H2 in H1; inv H1.
+ caseEq (Int.ltu i0 Int.iwordsize); intro; rewrite H2 in H1; inv H1.
apply eval_shl; auto.
- caseEq (Int.ltu i0 (Int.repr 32)); intro; rewrite H2 in H1; inv H1.
+ caseEq (Int.ltu i0 Int.iwordsize); intro; rewrite H2 in H1; inv H1.
apply eval_shr; auto.
- caseEq (Int.ltu i0 (Int.repr 32)); intro; rewrite H2 in H1; inv H1.
+ caseEq (Int.ltu i0 Int.iwordsize); intro; rewrite H2 in H1; inv H1.
apply eval_shru; auto.
apply eval_addf; auto.
apply eval_subf; auto.