423 Register r2,
424 Assembler::branch_condition cond,
425 Label& branch_target,
426 bool len64,
427 bool has_sign);
428
429 //
430 // Support for frame handling
431 //
432 // Specify the register that should be stored as the return pc in the
433 // current frame (default is R14).
434 inline void save_return_pc(Register pc = Z_R14);
435 inline void restore_return_pc();
436
437 // Get current PC.
438 address get_PC(Register result);
439
440 // Get current PC + offset. Offset given in bytes, must be even!
441 address get_PC(Register result, int64_t offset);
442
443 // Resize current frame either relatively wrt to current SP or absolute.
444 void resize_frame_sub(Register offset, Register fp, bool load_fp=true);
445 void resize_frame_absolute(Register addr, Register fp, bool load_fp=true);
446 void resize_frame(RegisterOrConstant offset, Register fp, bool load_fp=true);
447
448 // Push a frame of size bytes, if copy_sp is false, old_sp must already
449 // contain a copy of Z_SP.
450 void push_frame(Register bytes, Register old_sp, bool copy_sp = true, bool bytes_with_inverted_sign = false);
451
452 // Push a frame of size `bytes'. no abi space provided.
453 // Don't rely on register locking, instead pass a scratch register
454 // (Z_R0 by default).
455 // CAUTION! passing registers >= Z_R2 may produce bad results on
456 // old CPUs!
457 unsigned int push_frame(unsigned int bytes, Register scratch = Z_R0);
458
459 // Push a frame of size `bytes' with abi160 on top.
460 unsigned int push_frame_abi160(unsigned int bytes);
461
462 // Pop current C frame.
463 void pop_frame();
464
465 //
466 // Calls
467 //
468
469 private:
470 address _last_calls_return_pc;
471
472 public:
473 // Support for VM calls. This is the base routine called by the
474 // different versions of call_VM_leaf. The interpreter may customize
475 // this version by overriding it for its purposes (e.g., to
476 // save/restore additional registers when doing a VM call).
477 void call_VM_leaf_base(address entry_point);
478 void call_VM_leaf_base(address entry_point, bool allow_relocation);
479
480 // It is imperative that all calls into the VM are handled via the
481 // call_VM macros. They make sure that the stack linkage is setup
482 // correctly. Call_VM's correspond to ENTRY/ENTRY_X entry points
483 // while call_VM_leaf's correspond to LEAF entry points.
|
423 Register r2,
424 Assembler::branch_condition cond,
425 Label& branch_target,
426 bool len64,
427 bool has_sign);
428
429 //
430 // Support for frame handling
431 //
432 // Specify the register that should be stored as the return pc in the
433 // current frame (default is R14).
434 inline void save_return_pc(Register pc = Z_R14);
435 inline void restore_return_pc();
436
437 // Get current PC.
438 address get_PC(Register result);
439
440 // Get current PC + offset. Offset given in bytes, must be even!
441 address get_PC(Register result, int64_t offset);
442
443 // Accessing, and in particular modifying, a stack location is only safe if
444 // the stack pointer (Z_SP) is set such that the accessed stack location is
445 // in the reserved range.
446 //
447 // From a performance point of view, it is desirable not to change the SP
448 // first and then immediately use it to access the freshly reserved space.
449 // That opens a small gap, though. If, just after storing some value (the
450 // frame pointer) into the to-be-reserved space, an interrupt is caught,
451 // the handler might use the space beyond Z_SP for it's own purpose.
452 // If that happens, the stored value might get altered.
453
454 // Resize current frame either relatively wrt to current SP or absolute.
455 void resize_frame_sub(Register offset, Register fp, bool load_fp=true);
456 void resize_frame_abs_with_offset(Register newSP, Register fp, int offset, bool load_fp);
457 void resize_frame_absolute(Register newSP, Register fp, bool load_fp);
458 void resize_frame(RegisterOrConstant offset, Register fp, bool load_fp=true);
459
460 // Push a frame of size bytes, if copy_sp is false, old_sp must already
461 // contain a copy of Z_SP.
462 void push_frame(Register bytes, Register old_sp, bool copy_sp = true, bool bytes_with_inverted_sign = false);
463
464 // Push a frame of size `bytes'. no abi space provided.
465 // Don't rely on register locking, instead pass a scratch register
466 // (Z_R0 by default).
467 // CAUTION! passing registers >= Z_R2 may produce bad results on
468 // old CPUs!
469 unsigned int push_frame(unsigned int bytes, Register scratch = Z_R0);
470
471 // Push a frame of size `bytes' with abi160 on top.
472 unsigned int push_frame_abi160(unsigned int bytes);
473
474 // Pop current C frame.
475 void pop_frame();
476 // Pop current C frame and restore return PC register (Z_R14).
477 void pop_frame_restore_retPC(int frame_size_in_bytes);
478
479 //
480 // Calls
481 //
482
483 private:
484 address _last_calls_return_pc;
485
486 public:
487 // Support for VM calls. This is the base routine called by the
488 // different versions of call_VM_leaf. The interpreter may customize
489 // this version by overriding it for its purposes (e.g., to
490 // save/restore additional registers when doing a VM call).
491 void call_VM_leaf_base(address entry_point);
492 void call_VM_leaf_base(address entry_point, bool allow_relocation);
493
494 // It is imperative that all calls into the VM are handled via the
495 // call_VM macros. They make sure that the stack linkage is setup
496 // correctly. Call_VM's correspond to ENTRY/ENTRY_X entry points
497 // while call_VM_leaf's correspond to LEAF entry points.
|