From 12421d717405aa7964e437fc1167a23699b61ecc Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 29 Dec 2008 12:47:56 +0000 Subject: Replace cast{8,16}{signed,unsigned} with zero_ext and sign_ext. lib/Integers.v: added more properties for ARM port. lib/Coqlib.v: added more properties for division and powers of 2. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@928 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- backend/Cminor.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backend/Cminor.v') diff --git a/backend/Cminor.v b/backend/Cminor.v index 910eaa44..b6186f2e 100644 --- a/backend/Cminor.v +++ b/backend/Cminor.v @@ -230,10 +230,10 @@ Definition eval_constant (sp: val) (cst: constant) : option val := Definition eval_unop (op: unary_operation) (arg: val) : option val := match op, arg with - | Ocast8unsigned, _ => Some (Val.cast8unsigned arg) - | Ocast8signed, _ => Some (Val.cast8signed arg) - | Ocast16unsigned, _ => Some (Val.cast16unsigned arg) - | Ocast16signed, _ => Some (Val.cast16signed arg) + | Ocast8unsigned, _ => Some (Val.zero_ext 8 arg) + | Ocast8signed, _ => Some (Val.sign_ext 8 arg) + | Ocast16unsigned, _ => Some (Val.zero_ext 16 arg) + | Ocast16signed, _ => Some (Val.sign_ext 16 arg) | Onegint, Vint n1 => Some (Vint (Int.neg n1)) | Onotbool, Vint n1 => Some (Val.of_bool (Int.eq n1 Int.zero)) | Onotbool, Vptr b1 n1 => Some Vfalse -- cgit