+2006-06-16 Aleksey Demakov <ademakov@gmail.com>
+
+ * jit/jit-rules-x86.sel, jit/jit-rules-x86.ins: fix JIT_OP_IDIV and
+ JIT_OP_IREM rules for the divisor value of -1.
+
2006-06-09 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins: rewrite JIT_OP_STORE_RELATIVE_BYTE,
{
/* Dividing by -1 gives an exception if the argument
is minint, or simply negates for other values */
- unsigned char *patch = inst;
+ unsigned char *patch;
x86_alu_reg_imm(inst, X86_CMP, $1, jit_min_int);
+ patch = inst;
x86_branch8(inst, X86_CC_NE, 0, 0);
inst = throw_builtin(inst, func, JIT_RESULT_ARITHMETIC);
x86_patch(patch, inst);
{
/* Dividing by -1 gives an exception if the argument
is minint, or simply gives a remainder of zero */
- unsigned char *patch = inst;
+ unsigned char *patch;
x86_alu_reg_imm(inst, X86_CMP, $1, jit_min_int);
+ patch = inst;
x86_branch8(inst, X86_CC_NE, 0, 0);
inst = throw_builtin(inst, func, JIT_RESULT_ARITHMETIC);
x86_patch(patch, inst);
{
/* Dividing by -1 gives an exception if the argument
is minint, or simply negates for other values */
- unsigned char *patch = inst;
+ unsigned char *patch;
x86_alu_reg_imm(inst, X86_CMP, $1, jit_min_int);
+ patch = inst;
x86_branch8(inst, X86_CC_NE, 0, 0);
inst = throw_builtin(inst, func, JIT_RESULT_ARITHMETIC);
x86_patch(patch, inst);
{
/* Dividing by -1 gives an exception if the argument
is minint, or simply gives a remainder of zero */
- unsigned char *patch = inst;
+ unsigned char *patch;
x86_alu_reg_imm(inst, X86_CMP, $1, jit_min_int);
+ patch = inst;
x86_branch8(inst, X86_CC_NE, 0, 0);
inst = throw_builtin(inst, func, JIT_RESULT_ARITHMETIC);
x86_patch(patch, inst);