summaryrefslogtreecommitdiff
path: root/backend/Lineartyping.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-11-10 14:58:33 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2009-11-10 14:58:33 +0000
commit8ccc7f2f597aff2c8590c4e62552fb53406ad0f8 (patch)
treea553844ce1b6960ae5240f65593c085be733e3b2 /backend/Lineartyping.v
parent74487f079dd56663f97f9731cea328931857495c (diff)
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
Diffstat (limited to 'backend/Lineartyping.v')
-rw-r--r--backend/Lineartyping.v2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/Lineartyping.v b/backend/Lineartyping.v
index ba4952b..1fe7737 100644
--- a/backend/Lineartyping.v
+++ b/backend/Lineartyping.v
@@ -15,6 +15,7 @@
Require Import Coqlib.
Require Import Maps.
Require Import AST.
+Require Import Integers.
Require Import Op.
Require Import RTL.
Require Import Locations.
@@ -98,6 +99,7 @@ Inductive wt_instr : instruction -> Prop :=
| wt_Ljumptable:
forall arg tbl,
mreg_type arg = Tint ->
+ list_length_z tbl * 4 <= Int.max_signed ->
wt_instr (Ljumptable arg tbl)
| wt_Lreturn:
wt_instr (Lreturn).