diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2008-12-29 12:47:56 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2008-12-29 12:47:56 +0000 |
commit | 12421d717405aa7964e437fc1167a23699b61ecc (patch) | |
tree | 99b975380440ad4e91074f918ee781ec6383f0ce /common/Mem.v | |
parent | dc4bed2cf06f46687225275131f411c86c773598 (diff) | |
download | compcert-12421d717405aa7964e437fc1167a23699b61ecc.tar.gz compcert-12421d717405aa7964e437fc1167a23699b61ecc.zip |
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
Diffstat (limited to 'common/Mem.v')
-rw-r--r-- | common/Mem.v | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/Mem.v b/common/Mem.v index 35d93ed7..3db2ceba 100644 --- a/common/Mem.v +++ b/common/Mem.v @@ -1932,12 +1932,12 @@ Inductive val_content_inject (f: meminj): memory_chunk -> val -> val -> Prop := | val_content_inject_8: forall chunk n1 n2, chunk = Mint8unsigned \/ chunk = Mint8signed -> - Int.cast8unsigned n1 = Int.cast8unsigned n2 -> + Int.zero_ext 8 n1 = Int.zero_ext 8 n2 -> val_content_inject f chunk (Vint n1) (Vint n2) | val_content_inject_16: forall chunk n1 n2, chunk = Mint16unsigned \/ chunk = Mint16signed -> - Int.cast16unsigned n1 = Int.cast16unsigned n2 -> + Int.zero_ext 16 n1 = Int.zero_ext 16 n2 -> val_content_inject f chunk (Vint n1) (Vint n2) | val_content_inject_32: forall f1 f2, @@ -1957,20 +1957,20 @@ Proof. elim H1; intro; subst chunk; destruct chunk'; simpl in H0; try discriminate; simpl. - replace (Int.cast8signed n1) with (Int.cast8signed n2). - constructor. apply Int.cast8_signed_equal_if_unsigned_equal; auto. + replace (Int.sign_ext 8 n1) with (Int.sign_ext 8 n2). + constructor. apply Int.sign_ext_equal_if_zero_equal; auto. compute; auto. rewrite H2. constructor. - replace (Int.cast8signed n1) with (Int.cast8signed n2). - constructor. apply Int.cast8_signed_equal_if_unsigned_equal; auto. + replace (Int.sign_ext 8 n1) with (Int.sign_ext 8 n2). + constructor. apply Int.sign_ext_equal_if_zero_equal; auto. compute; auto. rewrite H2. constructor. elim H1; intro; subst chunk; destruct chunk'; simpl in H0; try discriminate; simpl. - replace (Int.cast16signed n1) with (Int.cast16signed n2). - constructor. apply Int.cast16_signed_equal_if_unsigned_equal; auto. + replace (Int.sign_ext 16 n1) with (Int.sign_ext 16 n2). + constructor. apply Int.sign_ext_equal_if_zero_equal; auto. compute; auto. rewrite H2. constructor. - replace (Int.cast16signed n1) with (Int.cast16signed n2). - constructor. apply Int.cast16_signed_equal_if_unsigned_equal; auto. + replace (Int.sign_ext 16 n1) with (Int.sign_ext 16 n2). + constructor. apply Int.sign_ext_equal_if_zero_equal; auto. compute; auto. rewrite H2. constructor. destruct chunk'; simpl in H0; try discriminate; simpl. |