< prev index next >

src/hotspot/cpu/x86/templateInterpreterGenerator_x86_64.cpp

Print this page




 321     }
 322     __ movl(end, Address(rsp, wordSize)); // end
 323     __ subl(end, off); // end - off
 324     __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32C()), crc, buf, len);
 325     // result in rax
 326     // _areturn
 327     __ pop(rdi);                // get return address
 328     __ mov(rsp, r13);           // set sp to sender sp
 329     __ jmp(rdi);
 330 
 331     return entry;
 332   }
 333 
 334   return NULL;
 335 }
 336 
 337 //
 338 // Various method entries
 339 //
 340 





















 341 address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
 342 
 343   // rbx,: Method*
 344   // rcx: scratrch
 345   // r13: sender sp
 346 
 347   if (!InlineIntrinsics) return NULL; // Generate a vanilla entry
 348 
 349   address entry_point = __ pc();
 350 
 351   // These don't need a safepoint check because they aren't virtually
 352   // callable. We won't enter these intrinsics from compiled code.
 353   // If in the future we added an intrinsic which was virtually callable
 354   // we'd have to worry about how to safepoint so that this code is used.
 355 
 356   // mathematical functions inlined by compiler
 357   // (interpreter must provide identical implementation
 358   // in order to avoid monotonicity bugs when switching
 359   // from interpreter to compiler in the middle of some
 360   // computation)




 321     }
 322     __ movl(end, Address(rsp, wordSize)); // end
 323     __ subl(end, off); // end - off
 324     __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32C()), crc, buf, len);
 325     // result in rax
 326     // _areturn
 327     __ pop(rdi);                // get return address
 328     __ mov(rsp, r13);           // set sp to sender sp
 329     __ jmp(rdi);
 330 
 331     return entry;
 332   }
 333 
 334   return NULL;
 335 }
 336 
 337 //
 338 // Various method entries
 339 //
 340 
 341 address TemplateInterpreterGenerator::generate_bit_entry(AbstractInterpreter::MethodKind kind) {
 342   address entry = __ pc();
 343 
 344   const Register bits  = c_rarg0;
 345   const Register index = c_rarg1;
 346 
 347   __ movptr(bits, Address(rsp, 2 * wordSize));
 348   __ movl(index, Address(rsp, 1 * wordSize));
 349 
 350   if (kind == Interpreter::java_lang_System_setBit)
 351     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::setBit())));
 352   else
 353     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::clrBit())));
 354 
 355   __ pop(rax);
 356   __ mov(rsp, r13);
 357   __ jmp(rax);
 358 
 359   return entry;
 360 }
 361 
 362 address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKind kind) {
 363 
 364   // rbx,: Method*
 365   // rcx: scratrch
 366   // r13: sender sp
 367 
 368   if (!InlineIntrinsics) return NULL; // Generate a vanilla entry
 369 
 370   address entry_point = __ pc();
 371 
 372   // These don't need a safepoint check because they aren't virtually
 373   // callable. We won't enter these intrinsics from compiled code.
 374   // If in the future we added an intrinsic which was virtually callable
 375   // we'd have to worry about how to safepoint so that this code is used.
 376 
 377   // mathematical functions inlined by compiler
 378   // (interpreter must provide identical implementation
 379   // in order to avoid monotonicity bugs when switching
 380   // from interpreter to compiler in the middle of some
 381   // computation)


< prev index next >