src/cpu/sparc/vm/bytecodeInterpreter_sparc.inline.hpp

changeset 2036
126ea7725993
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
equal deleted inserted replaced
2035:a64438a2b7e8 2036:126ea7725993
234 if (op1 == 0x80000000 && op2 == -1) return 0; 234 if (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 & 0x1f);
240 } 240 }
241 241
242 inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) { 242 inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) {
243 return op1 >> op2; // QQ op2 & 0x1f?? 243 return op1 >> (op2 & 0x1f);
244 } 244 }
245 245
246 inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) { 246 inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) {
247 return op1 - op2; 247 return op1 - op2;
248 } 248 }
249 249
250 inline jint BytecodeInterpreter::VMintUshr(jint op1, jint op2) { 250 inline juint BytecodeInterpreter::VMintUshr(jint op1, jint op2) {
251 return ((juint) op1) >> op2; // QQ op2 & 0x1f?? 251 return ((juint) op1) >> (op2 & 0x1f);
252 } 252 }
253 253
254 inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) { 254 inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) {
255 return op1 ^ op2; 255 return op1 ^ op2;
256 } 256 }

mercurial