projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16b9397
)
abort if switch gets too big
author
Matthias Braun
<matze@braunis.de>
Wed, 28 Nov 2007 15:46:57 +0000
(15:46 +0000)
committer
Matthias Braun
<matze@braunis.de>
Wed, 28 Nov 2007 15:46:57 +0000
(15:46 +0000)
[r16854]
ir/be/ia32/ia32_transform.c
patch
|
blob
|
history
diff --git
a/ir/be/ia32/ia32_transform.c
b/ir/be/ia32/ia32_transform.c
index
923c76e
..
a70c52e
100644
(file)
--- a/
ir/be/ia32/ia32_transform.c
+++ b/
ir/be/ia32/ia32_transform.c
@@
-2286,6
+2286,7
@@
static ir_node *create_Switch(ir_node *node)
ir_node *sel = get_Cond_selector(node);
ir_node *new_sel = be_transform_node(sel);
int switch_min = INT_MAX;
+ int switch_max = INT_MIN;
long default_pn = get_Cond_defaultProj(node);
ir_node *new_node;
const ir_edge_t *edge;
@@
-2301,6
+2302,12
@@
static ir_node *create_Switch(ir_node *node)
if(pn < switch_min)
switch_min = pn;
+ if(pn > switch_max)
+ switch_max = pn;
+ }
+
+ if((unsigned) (switch_max - switch_min) > 256000) {
+ panic("Size of switch %+F bigger than 256000", node);
}
if (switch_min != 0) {