diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-01-02 15:59:11 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-01-02 15:59:11 +0000 |
commit | 29e0c9b2c99a437fc9dfab66e1abdd546a5308d6 (patch) | |
tree | 2c3e924125d9b91e5e9b57b87c80f5b5ce9c6710 /arm/Asmgenproof1.v | |
parent | c71e155dbbf34fa17d14e8eee50a019c8ccfd6f5 (diff) |
Updated ARM backend wrt new static analyses and optimizations.
NeedOp, Deadcode: must have distinct needs per argument of an operator.
This change remains to be propagated to IA32 and PPC.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2399 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'arm/Asmgenproof1.v')
-rw-r--r-- | arm/Asmgenproof1.v | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arm/Asmgenproof1.v b/arm/Asmgenproof1.v index 21d2b73..1e65d72 100644 --- a/arm/Asmgenproof1.v +++ b/arm/Asmgenproof1.v @@ -917,6 +917,26 @@ Proof. generalize (addimm_correct x IR13 i k rs m). intros [rs' [EX [RES OTH]]]. exists rs'; auto with asmgen. + (* Ocast8signed *) + set (rs1 := nextinstr (rs#x <- (Val.shl rs#x0 (Vint (Int.repr 24))))). + set (rs2 := nextinstr (rs1#x <- (Val.shr rs1#x (Vint (Int.repr 24))))). + exists rs2. + split. apply exec_straight_two with rs1 m; auto. + split. unfold rs2; Simpl. unfold rs1; Simpl. + unfold Val.shr, Val.shl; destruct (rs x0); auto. + change (Int.ltu (Int.repr 24) Int.iwordsize) with true; simpl. + f_equal. symmetry. apply (Int.sign_ext_shr_shl 8). compute; auto. + intros. unfold rs2, rs1; Simpl. + (* Ocast16signed *) + set (rs1 := nextinstr (rs#x <- (Val.shl rs#x0 (Vint (Int.repr 16))))). + set (rs2 := nextinstr (rs1#x <- (Val.shr rs1#x (Vint (Int.repr 16))))). + exists rs2. + split. apply exec_straight_two with rs1 m; auto. + split. unfold rs2; Simpl. unfold rs1; Simpl. + unfold Val.shr, Val.shl; destruct (rs x0); auto. + change (Int.ltu (Int.repr 16) Int.iwordsize) with true; simpl. + f_equal. symmetry. apply (Int.sign_ext_shr_shl 16). compute; auto. + intros. unfold rs2, rs1; Simpl. (* Oaddimm *) generalize (addimm_correct x x0 i k rs m). intros [rs' [A [B C]]]. |