8250668: Clean up method_oop names in adlc

Reviewed-by: coleenp, adityam, thartmann
This commit is contained in:
Cesar 2020-09-16 05:54:16 +00:00 committed by Tobias Hartmann
parent 57f92d23b1
commit 2caa20a76d
15 changed files with 61 additions and 57 deletions

View file

@ -614,8 +614,8 @@ alloc_class chunk3(RFLAGS);
// Several register classes are automatically defined based upon information in // Several register classes are automatically defined based upon information in
// this architecture description. // this architecture description.
// 1) reg_class inline_cache_reg ( /* as def'd in frame section */ ) // 1) reg_class inline_cache_reg ( /* as def'd in frame section */ )
// 2) reg_class compiler_method_oop_reg ( /* as def'd in frame section */ ) // 2) reg_class compiler_method_reg ( /* as def'd in frame section */ )
// 2) reg_class interpreter_method_oop_reg ( /* as def'd in frame section */ ) // 2) reg_class interpreter_method_reg ( /* as def'd in frame section */ )
// 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ ) // 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ )
// //
@ -4049,8 +4049,8 @@ frame %{
// Inline Cache Register or Method for I2C. // Inline Cache Register or Method for I2C.
inline_cache_reg(R12); inline_cache_reg(R12);
// Method Oop Register when calling interpreter. // Method Register when calling interpreter.
interpreter_method_oop_reg(R12); interpreter_method_reg(R12);
// Number of stack slots consumed by locking an object // Number of stack slots consumed by locking an object
sync_stack_slots(2); sync_stack_slots(2);
@ -5619,9 +5619,9 @@ operand inline_cache_RegP(iRegP reg)
interface(REG_INTER); interface(REG_INTER);
%} %}
operand interpreter_method_oop_RegP(iRegP reg) operand interpreter_method_RegP(iRegP reg)
%{ %{
constraint(ALLOC_IN_RC(method_reg)); // interpreter_method_oop_reg constraint(ALLOC_IN_RC(method_reg)); // interpreter_method_reg
match(reg); match(reg);
match(iRegPNoSp); match(iRegPNoSp);
op_cost(0); op_cost(0);

View file

@ -1667,7 +1667,7 @@ frame %{
// These two registers define part of the calling convention // These two registers define part of the calling convention
// between compiled code and the interpreter. // between compiled code and the interpreter.
inline_cache_reg(R_Ricklass); // Inline Cache Register or Method* for I2C inline_cache_reg(R_Ricklass); // Inline Cache Register or Method* for I2C
interpreter_method_oop_reg(R_Rmethod); // Method Oop Register when calling interpreter interpreter_method_reg(R_Rmethod); // Method Register when calling interpreter
// Optional: name the operand used by cisc-spilling to access [stack_pointer + offset] // Optional: name the operand used by cisc-spilling to access [stack_pointer + offset]
cisc_spilling_operand_name(indOffset); cisc_spilling_operand_name(indOffset);
@ -2527,7 +2527,7 @@ operand inline_cache_regP(iRegP reg) %{
interface(REG_INTER); interface(REG_INTER);
%} %}
operand interpreter_method_oop_regP(iRegP reg) %{ operand interpreter_method_regP(iRegP reg) %{
constraint(ALLOC_IN_RC(Rmethod_regP)); constraint(ALLOC_IN_RC(Rmethod_regP));
match(reg); match(reg);
format %{ %} format %{ %}

View file

@ -196,7 +196,7 @@ alloc_class chunk2(APSR, FPSCR);
// Several register classes are automatically defined based upon information in // Several register classes are automatically defined based upon information in
// this architecture description. // this architecture description.
// 1) reg_class inline_cache_reg ( as defined in frame section ) // 1) reg_class inline_cache_reg ( as defined in frame section )
// 2) reg_class interpreter_method_oop_reg ( as defined in frame section ) // 2) reg_class interpreter_method_reg ( as defined in frame section )
// 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ ) // 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ )
// //

View file

@ -535,8 +535,8 @@ alloc_class chunk4 (
// information in this architecture description. // information in this architecture description.
// 1) reg_class inline_cache_reg ( as defined in frame section ) // 1) reg_class inline_cache_reg ( as defined in frame section )
// 2) reg_class compiler_method_oop_reg ( as defined in frame section ) // 2) reg_class compiler_method_reg ( as defined in frame section )
// 2) reg_class interpreter_method_oop_reg ( as defined in frame section ) // 2) reg_class interpreter_method_reg ( as defined in frame section )
// 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ ) // 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ )
// //
@ -3863,8 +3863,8 @@ frame %{
// Inline Cache Register or method for I2C. // Inline Cache Register or method for I2C.
inline_cache_reg(R19); // R19_method inline_cache_reg(R19); // R19_method
// Method Oop Register when calling interpreter. // Method Register when calling interpreter.
interpreter_method_oop_reg(R19); // R19_method interpreter_method_reg(R19); // R19_method
// Optional: name the operand used by cisc-spilling to access // Optional: name the operand used by cisc-spilling to access
// [stack_pointer + offset]. // [stack_pointer + offset].
@ -4773,15 +4773,15 @@ operand inline_cache_regP(iRegPdst reg) %{
interface(REG_INTER); interface(REG_INTER);
%} %}
operand compiler_method_oop_regP(iRegPdst reg) %{ operand compiler_method_regP(iRegPdst reg) %{
constraint(ALLOC_IN_RC(rscratch1_bits64_reg)); // compiler_method_oop_reg constraint(ALLOC_IN_RC(rscratch1_bits64_reg)); // compiler_method_reg
match(reg); match(reg);
format %{ %} format %{ %}
interface(REG_INTER); interface(REG_INTER);
%} %}
operand interpreter_method_oop_regP(iRegPdst reg) %{ operand interpreter_method_regP(iRegPdst reg) %{
constraint(ALLOC_IN_RC(r19_bits64_reg)); // interpreter_method_oop_reg constraint(ALLOC_IN_RC(r19_bits64_reg)); // interpreter_method_reg
match(reg); match(reg);
format %{ %} format %{ %}
interface(REG_INTER); interface(REG_INTER);

View file

@ -1258,7 +1258,7 @@ void LIR_Assembler::emit_static_call_stub() {
__ relocate(static_stub_Relocation::spec(call_pc)); __ relocate(static_stub_Relocation::spec(call_pc));
// See also Matcher::interpreter_method_oop_reg(). // See also Matcher::interpreter_method_reg().
AddressLiteral meta = __ allocate_metadata_address(NULL); AddressLiteral meta = __ allocate_metadata_address(NULL);
bool success = __ load_const_from_toc(Z_method, meta); bool success = __ load_const_from_toc(Z_method, meta);

View file

@ -278,8 +278,8 @@ alloc_class chunk2(
// information in this architecture description. // information in this architecture description.
// 1) reg_class inline_cache_reg (as defined in frame section) // 1) reg_class inline_cache_reg (as defined in frame section)
// 2) reg_class compiler_method_oop_reg (as defined in frame section) // 2) reg_class compiler_method_reg (as defined in frame section)
// 2) reg_class interpreter_method_oop_reg (as defined in frame section) // 2) reg_class interpreter_method_reg (as defined in frame section)
// 3) reg_class stack_slots(/* one chunk of stack-based "registers" */) // 3) reg_class stack_slots(/* one chunk of stack-based "registers" */)
// Integer Register Classes // Integer Register Classes
@ -2468,10 +2468,10 @@ frame %{
// interpreter_arg_ptr_reg(Z_R6); // interpreter_arg_ptr_reg(Z_R6);
// Temporary in compiled entry-points // Temporary in compiled entry-points
// compiler_method_oop_reg(Z_R1);//Z_R1_scratch // compiler_method_reg(Z_R1);//Z_R1_scratch
// Method Oop Register when calling interpreter // Method Register when calling interpreter
interpreter_method_oop_reg(Z_R9);//Z_method interpreter_method_reg(Z_R9);//Z_method
// Optional: name the operand used by cisc-spilling to access // Optional: name the operand used by cisc-spilling to access
// [stack_pointer + offset]. // [stack_pointer + offset].
@ -3536,15 +3536,15 @@ operand inline_cache_regP(iRegP reg) %{
interface(REG_INTER); interface(REG_INTER);
%} %}
operand compiler_method_oop_regP(iRegP reg) %{ operand compiler_method_regP(iRegP reg) %{
constraint(ALLOC_IN_RC(z_r1_RegP)); // compiler_method_oop_reg constraint(ALLOC_IN_RC(z_r1_RegP)); // compiler_method_reg
match(reg); match(reg);
format %{ %} format %{ %}
interface(REG_INTER); interface(REG_INTER);
%} %}
operand interpreter_method_oop_regP(iRegP reg) %{ operand interpreter_method_regP(iRegP reg) %{
constraint(ALLOC_IN_RC(z_r9_regP)); // interpreter_method_oop_reg constraint(ALLOC_IN_RC(z_r9_regP)); // interpreter_method_reg
match(reg); match(reg);
format %{ %} format %{ %}
interface(REG_INTER); interface(REG_INTER);

View file

@ -131,8 +131,8 @@ alloc_class chunk0( ECX, EBX, EBP, EDI, EAX, EDX, ESI, ESP,
// Several register classes are automatically defined based upon information in // Several register classes are automatically defined based upon information in
// this architecture description. // this architecture description.
// 1) reg_class inline_cache_reg ( /* as def'd in frame section */ ) // 1) reg_class inline_cache_reg ( /* as def'd in frame section */ )
// 2) reg_class compiler_method_oop_reg ( /* as def'd in frame section */ ) // 2) reg_class compiler_method_reg ( /* as def'd in frame section */ )
// 2) reg_class interpreter_method_oop_reg ( /* as def'd in frame section */ ) // 2) reg_class interpreter_method_reg ( /* as def'd in frame section */ )
// 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ ) // 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ )
// //
// Class for no registers (empty set). // Class for no registers (empty set).
@ -1931,7 +1931,7 @@ encode %{
// enc_class Java_Interpreter_Call (label labl) %{ // JAVA INTERPRETER CALL // enc_class Java_Interpreter_Call (label labl) %{ // JAVA INTERPRETER CALL
// // int ic_reg = Matcher::inline_cache_reg(); // // int ic_reg = Matcher::inline_cache_reg();
// // int ic_encode = Matcher::_regEncode[ic_reg]; // // int ic_encode = Matcher::_regEncode[ic_reg];
// // int imo_reg = Matcher::interpreter_method_oop_reg(); // // int imo_reg = Matcher::interpreter_method_reg();
// // int imo_encode = Matcher::_regEncode[imo_reg]; // // int imo_encode = Matcher::_regEncode[imo_reg];
// //
// // // Interpreter expects method_ptr in EBX, currently a callee-saved register, // // // Interpreter expects method_ptr in EBX, currently a callee-saved register,
@ -3194,7 +3194,7 @@ frame %{
// These three registers define part of the calling convention // These three registers define part of the calling convention
// between compiled code and the interpreter. // between compiled code and the interpreter.
inline_cache_reg(EAX); // Inline Cache Register inline_cache_reg(EAX); // Inline Cache Register
interpreter_method_oop_reg(EBX); // Method Oop Register when calling interpreter interpreter_method_reg(EBX); // Method Register when calling interpreter
// Optional: name the operand used by cisc-spilling to access [stack_pointer + offset] // Optional: name the operand used by cisc-spilling to access [stack_pointer + offset]
cisc_spilling_operand_name(indOffset32); cisc_spilling_operand_name(indOffset32);

View file

@ -161,8 +161,8 @@ alloc_class chunk0(R10, R10_H,
// Several register classes are automatically defined based upon information in // Several register classes are automatically defined based upon information in
// this architecture description. // this architecture description.
// 1) reg_class inline_cache_reg ( /* as def'd in frame section */ ) // 1) reg_class inline_cache_reg ( /* as def'd in frame section */ )
// 2) reg_class compiler_method_oop_reg ( /* as def'd in frame section */ ) // 2) reg_class compiler_method_reg ( /* as def'd in frame section */ )
// 2) reg_class interpreter_method_oop_reg ( /* as def'd in frame section */ ) // 2) reg_class interpreter_method_reg ( /* as def'd in frame section */ )
// 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ ) // 3) reg_class stack_slots( /* one chunk of stack-based "registers" */ )
// //
@ -2743,7 +2743,7 @@ frame
// These three registers define part of the calling convention // These three registers define part of the calling convention
// between compiled code and the interpreter. // between compiled code and the interpreter.
inline_cache_reg(RAX); // Inline Cache Register inline_cache_reg(RAX); // Inline Cache Register
interpreter_method_oop_reg(RBX); // Method Oop Register when interpreter_method_reg(RBX); // Method Register when
// calling interpreter // calling interpreter
// Optional: name the operand used by cisc-spilling to access // Optional: name the operand used by cisc-spilling to access

View file

@ -1002,7 +1002,11 @@ void ADLParser::frame_parse(void) {
skipws(); skipws();
} }
if (strcmp(token,"interpreter_method_oop_reg")==0) { if (strcmp(token,"interpreter_method_oop_reg")==0) {
interpreter_method_oop_parse(frame, false); parse_err(WARN, "Using obsolete Token, interpreter_method_oop_reg");
skipws();
}
if (strcmp(token,"interpreter_method_reg")==0) {
interpreter_method_parse(frame, false);
} }
if (strcmp(token,"cisc_spilling_operand_name")==0) { if (strcmp(token,"cisc_spilling_operand_name")==0) {
cisc_spilling_operand_name_parse(frame, false); cisc_spilling_operand_name_parse(frame, false);
@ -1130,9 +1134,9 @@ void ADLParser::inline_cache_parse(FrameForm *frame, bool native) {
frame->_inline_cache_reg = parse_one_arg("inline cache reg entry"); frame->_inline_cache_reg = parse_one_arg("inline cache reg entry");
} }
//------------------------------interpreter_method_oop_parse------------------ //------------------------------interpreter_method_parse------------------
void ADLParser::interpreter_method_oop_parse(FrameForm *frame, bool native) { void ADLParser::interpreter_method_parse(FrameForm *frame, bool native) {
frame->_interpreter_method_oop_reg = parse_one_arg("method reg entry"); frame->_interpreter_method_reg = parse_one_arg("method reg entry");
} }
//------------------------------cisc_spilling_operand_parse--------------------- //------------------------------cisc_spilling_operand_parse---------------------

View file

@ -115,7 +115,7 @@ protected:
void interpreter_frame_pointer_parse(FrameForm *frame, bool native); void interpreter_frame_pointer_parse(FrameForm *frame, bool native);
void inline_cache_parse(FrameForm *frame, bool native); void inline_cache_parse(FrameForm *frame, bool native);
void interpreter_arg_ptr_parse(FrameForm *frame, bool native); void interpreter_arg_ptr_parse(FrameForm *frame, bool native);
void interpreter_method_oop_parse(FrameForm *frame, bool native); void interpreter_method_parse(FrameForm *frame, bool native);
void cisc_spilling_operand_name_parse(FrameForm *frame, bool native); void cisc_spilling_operand_name_parse(FrameForm *frame, bool native);
void stack_alignment_parse(FrameForm *frame); void stack_alignment_parse(FrameForm *frame);
void return_addr_parse(FrameForm *frame, bool native); void return_addr_parse(FrameForm *frame, bool native);

View file

@ -336,7 +336,7 @@ public:
// Public Data // Public Data
char *_sync_stack_slots; char *_sync_stack_slots;
char *_inline_cache_reg; char *_inline_cache_reg;
char *_interpreter_method_oop_reg; char *_interpreter_method_reg;
char *_interpreter_frame_pointer_reg; char *_interpreter_frame_pointer_reg;
char *_cisc_spilling_operand_name; char *_cisc_spilling_operand_name;
char *_frame_pointer; char *_frame_pointer;

View file

@ -4192,12 +4192,12 @@ void ArchDesc::buildFrameMethods(FILE *fp_cpp) {
fprintf(fp_cpp,"int Matcher::inline_cache_reg_encode() {"); fprintf(fp_cpp,"int Matcher::inline_cache_reg_encode() {");
fprintf(fp_cpp," return _regEncode[inline_cache_reg()]; }\n\n"); fprintf(fp_cpp," return _regEncode[inline_cache_reg()]; }\n\n");
// Interpreter's Method Oop Register, mask definition, and encoding // Interpreter's Method Register, mask definition, and encoding
fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_method_oop_reg() {"); fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_method_reg() {");
fprintf(fp_cpp," return OptoReg::Name(%s_num); }\n\n", fprintf(fp_cpp," return OptoReg::Name(%s_num); }\n\n",
_frame->_interpreter_method_oop_reg); _frame->_interpreter_method_reg);
fprintf(fp_cpp,"int Matcher::interpreter_method_oop_reg_encode() {"); fprintf(fp_cpp,"int Matcher::interpreter_method_reg_encode() {");
fprintf(fp_cpp," return _regEncode[interpreter_method_oop_reg()]; }\n\n"); fprintf(fp_cpp," return _regEncode[interpreter_method_reg()]; }\n\n");
// Interpreter's Frame Pointer Register, mask definition, and encoding // Interpreter's Frame Pointer Register, mask definition, and encoding
fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_frame_pointer_reg() {"); fprintf(fp_cpp,"OptoReg::Name Matcher::interpreter_frame_pointer_reg() {");

View file

@ -495,7 +495,7 @@ class ConstantPool : public Metadata {
// a String entry. // a String entry.
// This can happen if the user patches a live // This can happen if the user patches a live
// object into a CONSTANT_String entry of an unsafe anonymous class. // object into a CONSTANT_String entry of an unsafe anonymous class.
// Method oops internally created for method handles may also // Methods internally created for method handles may also
// use pseudo-strings to link themselves to related metaobjects. // use pseudo-strings to link themselves to related metaobjects.
bool is_pseudo_string_at(int which); bool is_pseudo_string_at(int which);

View file

@ -415,12 +415,12 @@ public:
// The Method-klass-holder may be passed in the inline_cache_reg // The Method-klass-holder may be passed in the inline_cache_reg
// and then expanded into the inline_cache_reg and a method_ptr register // and then expanded into the inline_cache_reg and a method_ptr register
static OptoReg::Name interpreter_method_oop_reg(); static OptoReg::Name interpreter_method_reg();
static int interpreter_method_oop_reg_encode(); static int interpreter_method_reg_encode();
static OptoReg::Name compiler_method_oop_reg(); static OptoReg::Name compiler_method_reg();
static const RegMask &compiler_method_oop_reg_mask(); static const RegMask &compiler_method_reg_mask();
static int compiler_method_oop_reg_encode(); static int compiler_method_reg_encode();
// Interpreter's Frame Pointer Register // Interpreter's Frame Pointer Register
static OptoReg::Name interpreter_frame_pointer_reg(); static OptoReg::Name interpreter_frame_pointer_reg();

View file

@ -338,9 +338,9 @@ typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry;
volatile_nonstatic_field(ConstantPoolCacheEntry, _f2, intx) \ volatile_nonstatic_field(ConstantPoolCacheEntry, _f2, intx) \
volatile_nonstatic_field(ConstantPoolCacheEntry, _flags, intx) \ volatile_nonstatic_field(ConstantPoolCacheEntry, _flags, intx) \
\ \
/********************************/ \ /*****************************/ \
/* MethodOop-related structures */ \ /* Method related structures */ \
/********************************/ \ /*****************************/ \
\ \
nonstatic_field(CheckedExceptionElement, class_cp_index, u2) \ nonstatic_field(CheckedExceptionElement, class_cp_index, u2) \
nonstatic_field(LocalVariableTableElement, start_bci, u2) \ nonstatic_field(LocalVariableTableElement, start_bci, u2) \
@ -1284,9 +1284,9 @@ typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry;
\ \
declare_toplevel_type(OopHandle) \ declare_toplevel_type(OopHandle) \
\ \
/*************************************/ \ /**********************************/ \
/* MethodOop-related data structures */ \ /* Method related data structures */ \
/*************************************/ \ /**********************************/ \
\ \
declare_toplevel_type(CheckedExceptionElement) \ declare_toplevel_type(CheckedExceptionElement) \
declare_toplevel_type(LocalVariableTableElement) \ declare_toplevel_type(LocalVariableTableElement) \