From 8ccc7f2f597aff2c8590c4e62552fb53406ad0f8 Mon Sep 17 00:00:00 2001 From: xleroy Date: Tue, 10 Nov 2009 14:58:33 +0000 Subject: More realistic treatment of jump tables: show the absence of overflow when accessing the table git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1172 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- powerpc/Asmgen.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'powerpc/Asmgen.v') diff --git a/powerpc/Asmgen.v b/powerpc/Asmgen.v index 4beabb1c..2c65ca4d 100644 --- a/powerpc/Asmgen.v +++ b/powerpc/Asmgen.v @@ -503,7 +503,8 @@ Definition transl_instr (f: Mach.function) (i: Mach.instruction) (k: code) := transl_cond cond args (if (snd p) then Pbt (fst p) lbl :: k else Pbf (fst p) lbl :: k) | Mjumptable arg tbl => - Pbtbl (ireg_of arg) tbl :: k + Prlwinm GPR12 (ireg_of arg) (Int.repr 2) (Int.repr (-4)) :: + Pbtbl GPR12 tbl :: k | Mreturn => Plwz GPR12 (Cint f.(fn_retaddr_ofs)) GPR1 :: Pmtlr GPR12 :: -- cgit