src/share/vm/adlc/output_h.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6961690 Cdiff src/share/vm/adlc/output_h.cpp

src/share/vm/adlc/output_h.cpp

Print this page
rev 1838 : 6961690: load oops from constant table on SPARC
Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence.
Reviewed-by:

*** 1548,1558 **** is_pc_relative = true; attr = (Attribute *)attr->_next; } // virtual functions for encode and format ! // // Output the opcode function and the encode function here using the // encoding class information in the _insencode slot. if ( instr->_insencode ) { fprintf(fp," virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;\n"); } --- 1548,1563 ---- is_pc_relative = true; attr = (Attribute *)attr->_next; } // virtual functions for encode and format ! ! // Virtual function for evaluating the constant. ! if (instr->is_mach_constant()) { ! fprintf(fp," virtual void eval_constant();\n"); ! } ! // Output the opcode function and the encode function here using the // encoding class information in the _insencode slot. if ( instr->_insencode ) { fprintf(fp," virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const;\n"); }
*** 1750,1759 **** --- 1755,1765 ---- fprintf(fp, " }\n"); // Virtual methods which are only generated to override base class if( instr->expands() || instr->needs_projections() || instr->has_temps() || + instr->is_mach_constant() || instr->_matrule != NULL && instr->num_opnds() != instr->num_unique_opnds() ) { fprintf(fp," virtual MachNode *Expand(State *state, Node_List &proj_list, Node* mem);\n"); }
*** 1778,1805 **** } // Declare short branch methods, if applicable instr->declare_short_branch_methods(fp); - // Instructions containing a constant that will be entered into the - // float/double table redefine the base virtual function - #ifdef SPARC - // Sparc doubles entries in the constant table require more space for - // alignment. (expires 9/98) - int table_entries = (3 * instr->num_consts( _globalNames, Form::idealD )) - + instr->num_consts( _globalNames, Form::idealF ); - #else - int table_entries = instr->num_consts( _globalNames, Form::idealD ) - + instr->num_consts( _globalNames, Form::idealF ); - #endif - if( table_entries != 0 ) { - fprintf(fp," virtual int const_size() const {"); - fprintf(fp, " return %d;", table_entries); - fprintf(fp, " }\n"); - } - - // See if there is an "ins_pipe" declaration for this instruction if (instr->_ins_pipe) { fprintf(fp," static const Pipeline *pipeline_class();\n"); fprintf(fp," virtual const Pipeline *pipeline() const;\n"); } --- 1784,1793 ----
src/share/vm/adlc/output_h.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File