211 return op1 & op2; |
211 return op1 & op2; |
212 } |
212 } |
213 |
213 |
214 inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) { |
214 inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) { |
215 /* it's possible we could catch this special case implicitly */ |
215 /* it's possible we could catch this special case implicitly */ |
216 if (op1 == 0x80000000 && op2 == -1) return op1; |
216 if ((juint)op1 == 0x80000000 && op2 == -1) return op1; |
217 else return op1 / op2; |
217 else return op1 / op2; |
218 } |
218 } |
219 |
219 |
220 inline jint BytecodeInterpreter::VMintMul(jint op1, jint op2) { |
220 inline jint BytecodeInterpreter::VMintMul(jint op1, jint op2) { |
221 return op1 * op2; |
221 return op1 * op2; |
229 return op1 | op2; |
229 return op1 | op2; |
230 } |
230 } |
231 |
231 |
232 inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) { |
232 inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) { |
233 /* it's possible we could catch this special case implicitly */ |
233 /* it's possible we could catch this special case implicitly */ |
234 if (op1 == 0x80000000 && op2 == -1) return 0; |
234 if ((juint)op1 == 0x80000000 && op2 == -1) return 0; |
235 else return op1 % op2; |
235 else return op1 % op2; |
236 } |
236 } |
237 |
237 |
238 inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) { |
238 inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) { |
239 return op1 << op2; |
239 return op1 << op2; |