src/cpu/x86/vm/methodHandles_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
7045514 Cdiff src/cpu/x86/vm/methodHandles_x86.cpp
src/cpu/x86/vm/methodHandles_x86.cpp
Print this page
*** 137,149 ****
return cookie;
}
void MethodHandles::RicochetFrame::generate_ricochet_blob(MacroAssembler* _masm,
// output params:
- int* frame_size_in_words,
int* bounce_offset,
! int* exception_offset) {
(*frame_size_in_words) = RicochetFrame::frame_size_in_bytes() / wordSize;
address start = __ pc();
#ifdef ASSERT
--- 137,149 ----
return cookie;
}
void MethodHandles::RicochetFrame::generate_ricochet_blob(MacroAssembler* _masm,
// output params:
int* bounce_offset,
! int* exception_offset,
! int* frame_size_in_words) {
(*frame_size_in_words) = RicochetFrame::frame_size_in_bytes() / wordSize;
address start = __ pc();
#ifdef ASSERT
*** 364,374 ****
void MethodHandles::load_stack_move(MacroAssembler* _masm,
Register rdi_stack_move,
Register rcx_amh,
bool might_be_negative) {
! BLOCK_COMMENT("load_stack_move");
Address rcx_amh_conversion(rcx_amh, java_lang_invoke_AdapterMethodHandle::conversion_offset_in_bytes());
__ movl(rdi_stack_move, rcx_amh_conversion);
__ sarl(rdi_stack_move, CONV_STACK_MOVE_SHIFT);
#ifdef _LP64
if (might_be_negative) {
--- 364,374 ----
void MethodHandles::load_stack_move(MacroAssembler* _masm,
Register rdi_stack_move,
Register rcx_amh,
bool might_be_negative) {
! BLOCK_COMMENT("load_stack_move {");
Address rcx_amh_conversion(rcx_amh, java_lang_invoke_AdapterMethodHandle::conversion_offset_in_bytes());
__ movl(rdi_stack_move, rcx_amh_conversion);
__ sarl(rdi_stack_move, CONV_STACK_MOVE_SHIFT);
#ifdef _LP64
if (might_be_negative) {
*** 385,394 ****
--- 385,395 ----
__ jcc(Assembler::greater, L_ok);
__ bind(L_bad);
__ stop("load_stack_move of garbage value");
__ BIND(L_ok);
}
+ BLOCK_COMMENT("} load_stack_move");
}
#ifdef ASSERT
void MethodHandles::RicochetFrame::verify_offsets() {
// Check compatibility of this struct with the more generally used offsets of class frame:
*** 1145,1155 ****
address interp_entry = __ pc();
trace_method_handle(_masm, entry_name(ek));
! BLOCK_COMMENT(entry_name(ek));
switch ((int) ek) {
case _raise_exception:
{
// Not a real MH entry, but rather shared code for raising an
--- 1146,1156 ----
address interp_entry = __ pc();
trace_method_handle(_masm, entry_name(ek));
! BLOCK_COMMENT(err_msg("Entry %s {", entry_name(ek)));
switch ((int) ek) {
case _raise_exception:
{
// Not a real MH entry, but rather shared code for raising an
*** 1290,1300 ****
case _bound_long_mh:
case _bound_ref_direct_mh:
case _bound_int_direct_mh:
case _bound_long_direct_mh:
{
! bool direct_to_method = (ek >= _bound_ref_direct_mh);
BasicType arg_type = ek_bound_mh_arg_type(ek);
int arg_slots = type2size[arg_type];
// make room for the new argument:
__ movl(rax_argslot, rcx_bmh_vmargslot);
--- 1291,1301 ----
case _bound_long_mh:
case _bound_ref_direct_mh:
case _bound_int_direct_mh:
case _bound_long_direct_mh:
{
! const bool direct_to_method = (ek >= _bound_ref_direct_mh);
BasicType arg_type = ek_bound_mh_arg_type(ek);
int arg_slots = type2size[arg_type];
// make room for the new argument:
__ movl(rax_argslot, rcx_bmh_vmargslot);
*** 1927,1937 ****
// Normal adjustment: ... keep1 | +dest+ | -collect- | keep2 | RF... | collect |
// If retaining args: ... keep1 | +dest+ | collect | keep2 | RF... | collect |
// In the non-retaining case, this might move keep2 either up or down.
// We don't have to copy the whole | RF... collect | complex,
// but we must adjust RF.saved_args_base.
! // Also, from now on, we will forget about the origial copy of |collect|.
// If we are retaining it, we will treat it as part of |keep2|.
// For clarity we will define |keep3| = |collect|keep2| or |keep2|.
BLOCK_COMMENT("adjust trailing arguments {");
// Compare the sizes of |+dest+| and |-collect-|, which are opposed opening and closing movements.
--- 1928,1938 ----
// Normal adjustment: ... keep1 | +dest+ | -collect- | keep2 | RF... | collect |
// If retaining args: ... keep1 | +dest+ | collect | keep2 | RF... | collect |
// In the non-retaining case, this might move keep2 either up or down.
// We don't have to copy the whole | RF... collect | complex,
// but we must adjust RF.saved_args_base.
! // Also, from now on, we will forget about the original copy of |collect|.
// If we are retaining it, we will treat it as part of |keep2|.
// For clarity we will define |keep3| = |collect|keep2| or |keep2|.
BLOCK_COMMENT("adjust trailing arguments {");
// Compare the sizes of |+dest+| and |-collect-|, which are opposed opening and closing movements.
*** 1984,1994 ****
// Old and new argument locations (based at slot 0).
// Net shift (&new_argv - &old_argv) is (close_count - open_count).
bool zero_open_count = (open_count == 0); // remember this bit of info
if (move_keep3 && fix_arg_base) {
! // It will be easier t have everything in one register:
if (close_count.is_register()) {
// Deduct open_count from close_count register to get a clean +/- value.
__ subptr(close_count.as_register(), open_count);
} else {
close_count = close_count.as_constant() - open_count;
--- 1985,1995 ----
// Old and new argument locations (based at slot 0).
// Net shift (&new_argv - &old_argv) is (close_count - open_count).
bool zero_open_count = (open_count == 0); // remember this bit of info
if (move_keep3 && fix_arg_base) {
! // It will be easier to have everything in one register:
if (close_count.is_register()) {
// Deduct open_count from close_count register to get a clean +/- value.
__ subptr(close_count.as_register(), open_count);
} else {
close_count = close_count.as_constant() - open_count;
*** 2394,2403 ****
--- 2395,2405 ----
default:
// do not require all platforms to recognize all adapter types
__ nop();
return;
}
+ BLOCK_COMMENT(err_msg("} Entry %s", entry_name(ek)));
__ hlt();
address me_cookie = MethodHandleEntry::start_compiled_entry(_masm, interp_entry);
__ unimplemented(entry_name(ek)); // %%% FIXME: NYI
src/cpu/x86/vm/methodHandles_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File