From 2bfc5d3e1e40ac7f0aad9a47cdff054eb721e532 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 13 Jun 2010 20:26:58 -0700 Subject: [PATCH] Fixed switch case comparisons failing with large numbers (bug 4457, r=pred). --- sourcepawn/jit/x86/jit_x86.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sourcepawn/jit/x86/jit_x86.cpp b/sourcepawn/jit/x86/jit_x86.cpp index 60e7a9334..01cc20186 100644 --- a/sourcepawn/jit/x86/jit_x86.cpp +++ b/sourcepawn/jit/x86/jit_x86.cpp @@ -1733,13 +1733,8 @@ inline void WriteOp_Switch(JitWriter *jit) for (cell_t i=0; i OR cmp al, - if (val >= SCHAR_MIN && val <= SCHAR_MAX) - { - IA32_Cmp_Al_Imm8(jit, val); - } else { - IA32_Cmp_Eax_Imm32(jit, cases[i].val); - } + //cmp eax, + IA32_Cmp_Eax_Imm32(jit, val); IA32_Jump_Cond_Imm32_Rel(jit, CC_E, RelocLookup(jit, cases[i].offs, false)); } /* After all this, jump to the default case! */