From ef40c6d36f1c3125f3aa78ea4eaa61dcc7bcae67 Mon Sep 17 00:00:00 2001 From: xleroy Date: Thu, 19 Nov 2009 13:32:09 +0000 Subject: 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 --- backend/Cminor.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend/Cminor.v') diff --git a/backend/Cminor.v b/backend/Cminor.v index 8cc2185..aa9c511 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)) -- cgit v1.2.3