364 case itos: push_i(); break; 365 case ltos: push_l(); break; 366 case ftos: push_f(); break; 367 case dtos: push_d(); break; 368 case vtos: /* nothing to do */ break; 369 default : ShouldNotReachHere(); 370 } 371 } 372 373 374 // Helpers for swap and dup 375 void InterpreterMacroAssembler::load_ptr(int n, Register val) { 376 movptr(val, Address(rsp, Interpreter::expr_offset_in_bytes(n))); 377 } 378 379 void InterpreterMacroAssembler::store_ptr(int n, Register val) { 380 movptr(Address(rsp, Interpreter::expr_offset_in_bytes(n)), val); 381 } 382 383 384 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point) { 385 MacroAssembler::call_VM_leaf_base(entry_point, 0); 386 } 387 388 389 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point, 390 Register arg_1) { 391 if (c_rarg0 != arg_1) { 392 mov(c_rarg0, arg_1); 393 } 394 MacroAssembler::call_VM_leaf_base(entry_point, 1); 395 } 396 397 398 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point, 399 Register arg_1, 400 Register arg_2) { 401 assert(c_rarg0 != arg_2, "smashed argument"); 402 assert(c_rarg1 != arg_1, "smashed argument"); 403 if (c_rarg0 != arg_1) { 404 mov(c_rarg0, arg_1); 405 } 406 if (c_rarg1 != arg_2) { 407 mov(c_rarg1, arg_2); 408 } 409 MacroAssembler::call_VM_leaf_base(entry_point, 2); 410 } 411 412 void InterpreterMacroAssembler::super_call_VM_leaf(address entry_point, 413 Register arg_1, 414 Register arg_2, 415 Register arg_3) { 416 assert(c_rarg0 != arg_2, "smashed argument"); 417 assert(c_rarg0 != arg_3, "smashed argument"); 418 assert(c_rarg1 != arg_1, "smashed argument"); 419 assert(c_rarg1 != arg_3, "smashed argument"); 420 assert(c_rarg2 != arg_1, "smashed argument"); 421 assert(c_rarg2 != arg_2, "smashed argument"); 422 if (c_rarg0 != arg_1) { 423 mov(c_rarg0, arg_1); 424 } 425 if (c_rarg1 != arg_2) { 426 mov(c_rarg1, arg_2); 427 } 428 if (c_rarg2 != arg_3) { 429 mov(c_rarg2, arg_3); 430 } 431 MacroAssembler::call_VM_leaf_base(entry_point, 3); 432 } 433 434 void InterpreterMacroAssembler::prepare_to_jump_from_interpreted() { 435 // set sender sp 436 lea(r13, Address(rsp, wordSize)); 437 // record last_sp 438 movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), r13); 439 } 440 441 442 // Jump to from_interpreted entry of a call unless single stepping is possible 443 // in this thread in which case we must call the i2i entry 444 void InterpreterMacroAssembler::jump_from_interpreted(Register method, Register temp) { 445 prepare_to_jump_from_interpreted(); 446 447 if (JvmtiExport::can_post_interpreter_events()) { 448 Label run_compiled_code; 449 // JVMTI events, such as single-stepping, are implemented partly by avoiding running 450 // compiled code in threads for which the event is enabled. Check here for 451 // interp_only_mode if these events CAN be enabled. 452 // interp_only is an int, on little endian it is sufficient to test the byte only 453 // Is a cmpl faster? | 364 case itos: push_i(); break; 365 case ltos: push_l(); break; 366 case ftos: push_f(); break; 367 case dtos: push_d(); break; 368 case vtos: /* nothing to do */ break; 369 default : ShouldNotReachHere(); 370 } 371 } 372 373 374 // Helpers for swap and dup 375 void InterpreterMacroAssembler::load_ptr(int n, Register val) { 376 movptr(val, Address(rsp, Interpreter::expr_offset_in_bytes(n))); 377 } 378 379 void InterpreterMacroAssembler::store_ptr(int n, Register val) { 380 movptr(Address(rsp, Interpreter::expr_offset_in_bytes(n)), val); 381 } 382 383 384 void InterpreterMacroAssembler::prepare_to_jump_from_interpreted() { 385 // set sender sp 386 lea(r13, Address(rsp, wordSize)); 387 // record last_sp 388 movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), r13); 389 } 390 391 392 // Jump to from_interpreted entry of a call unless single stepping is possible 393 // in this thread in which case we must call the i2i entry 394 void InterpreterMacroAssembler::jump_from_interpreted(Register method, Register temp) { 395 prepare_to_jump_from_interpreted(); 396 397 if (JvmtiExport::can_post_interpreter_events()) { 398 Label run_compiled_code; 399 // JVMTI events, such as single-stepping, are implemented partly by avoiding running 400 // compiled code in threads for which the event is enabled. Check here for 401 // interp_only_mode if these events CAN be enabled. 402 // interp_only is an int, on little endian it is sufficient to test the byte only 403 // Is a cmpl faster? |