Skip to content
Permalink
Browse files
8255397: x86: coalesce reference and int entry points into vtos bytec…
…odes

Reviewed-by: shade, coleenp
  • Loading branch information
cl4es committed Oct 28, 2020
1 parent 3bd5b80 commit bbf0a31e9ea88bb0b5ac9468a61ab4e307528f5b
Showing with 15 additions and 5 deletions.
  1. +4 −0 src/hotspot/cpu/x86/interp_masm_x86.cpp
  2. +9 −0 src/hotspot/cpu/x86/interp_masm_x86.hpp
  3. +2 −5 src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp
@@ -605,6 +605,10 @@ void InterpreterMacroAssembler::push_i(Register r) {
push(r);
}

void InterpreterMacroAssembler::push_i_or_ptr(Register r) {
push(r);
}

void InterpreterMacroAssembler::push_f(XMMRegister r) {
subptr(rsp, wordSize);
movflt(Address(rsp, 0), r);
@@ -139,9 +139,18 @@ class InterpreterMacroAssembler: public MacroAssembler {
// Expression stack
void pop_ptr(Register r = rax);
void pop_i(Register r = rax);

// On x86, pushing a ptr or an int is semantically identical, but we
// maintain a distinction for clarity and for making it easier to change
// semantics in the future
void push_ptr(Register r = rax);
void push_i(Register r = rax);

// push_i_or_ptr is provided for when explicitly allowing either a ptr or
// an int might have some advantage, while still documenting the fact that a
// ptr might be pushed to the stack.
void push_i_or_ptr(Register r = rax);

void push_f(XMMRegister r);
void pop_f(XMMRegister r);
void pop_d(XMMRegister r);
@@ -1761,9 +1761,6 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
address& vep) {
assert(t->is_valid() && t->tos_in() == vtos, "illegal template");
Label L;
aep = __ pc(); // atos entry point
__ push_ptr();
__ jmp(L);
#ifndef _LP64
fep = __ pc(); // ftos entry point
__ push(ftos);
@@ -1782,8 +1779,8 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
lep = __ pc(); // ltos entry point
__ push_l();
__ jmp(L);
bep = cep = sep = iep = __ pc(); // [bcsi]tos entry point
__ push_i();
aep = bep = cep = sep = iep = __ pc(); // [abcsi]tos entry point
__ push_i_or_ptr();
vep = __ pc(); // vtos entry point
__ bind(L);
generate_and_dispatch(t);

1 comment on commit bbf0a31

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on bbf0a31 Oct 28, 2020

Please sign in to comment.