From 74487f079dd56663f97f9731cea328931857495c Mon Sep 17 00:00:00 2001 From: xleroy Date: Tue, 10 Nov 2009 12:50:57 +0000 Subject: Added support for jump tables in back end. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1171 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- backend/Constpropproof.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'backend/Constpropproof.v') diff --git a/backend/Constpropproof.v b/backend/Constpropproof.v index dadb192f..fff9a60d 100644 --- a/backend/Constpropproof.v +++ b/backend/Constpropproof.v @@ -390,6 +390,18 @@ Proof. simpl; auto. unfold transfer; rewrite H; auto. + (* Ijumptable *) + exists (State s' (transf_code (analyze f) (fn_code f)) sp pc' rs m); split. + caseEq (intval (approx_reg (analyze f)!!pc) arg); intros. + exploit intval_correct; eauto. eexact MATCH. intro VRS. + eapply exec_Inop; eauto. TransfInstr. rewrite H2. + replace i with n by congruence. rewrite H1. auto. + eapply exec_Ijumptable; eauto. TransfInstr. rewrite H2. auto. + constructor; auto. + eapply analyze_correct_1; eauto. + simpl. eapply list_nth_z_in; eauto. + unfold transfer; rewrite H; auto. + (* Ireturn *) exists (Returnstate s' (regmap_optget or Vundef rs) (free m stk)); split. eapply exec_Ireturn; eauto. TransfInstr; auto. -- cgit