@@ -3099,42 +3099,6 @@ void ArchDesc::define_oper_interface(FILE *fp, OperandForm &oper, FormDict &glob
30993099 }
31003100}
31013101
3102- //
3103- // Construct the method to copy _idx, inputs and operands to new node.
3104- static void define_fill_new_machnode (bool used, FILE *fp_cpp) {
3105- fprintf (fp_cpp, " \n " );
3106- fprintf (fp_cpp, " // Copy _idx, inputs and operands to new node\n " );
3107- fprintf (fp_cpp, " void MachNode::fill_new_machnode(MachNode* node) const {\n " );
3108- if ( !used ) {
3109- fprintf (fp_cpp, " // This architecture does not have cisc or short branch instructions\n " );
3110- fprintf (fp_cpp, " ShouldNotCallThis();\n " );
3111- fprintf (fp_cpp, " }\n " );
3112- } else {
3113- // New node must use same node index for access through allocator's tables
3114- fprintf (fp_cpp, " // New node must use same node index\n " );
3115- fprintf (fp_cpp, " node->set_idx( _idx );\n " );
3116- // Copy machine-independent inputs
3117- fprintf (fp_cpp, " // Copy machine-independent inputs\n " );
3118- fprintf (fp_cpp, " for( uint j = 0; j < req(); j++ ) {\n " );
3119- fprintf (fp_cpp, " node->add_req(in(j));\n " );
3120- fprintf (fp_cpp, " }\n " );
3121- // Copy machine operands to new MachNode
3122- fprintf (fp_cpp, " // Copy my operands, except for cisc position\n " );
3123- fprintf (fp_cpp, " int nopnds = num_opnds();\n " );
3124- fprintf (fp_cpp, " assert( node->num_opnds() == (uint)nopnds, \" Must have same number of operands\" );\n " );
3125- fprintf (fp_cpp, " MachOper **to = node->_opnds;\n " );
3126- fprintf (fp_cpp, " for( int i = 0; i < nopnds; i++ ) {\n " );
3127- fprintf (fp_cpp, " if( i != cisc_operand() ) \n " );
3128- fprintf (fp_cpp, " to[i] = _opnds[i]->clone();\n " );
3129- fprintf (fp_cpp, " }\n " );
3130- fprintf (fp_cpp, " // Do not increment node index counter, since node reuses my index\n " );
3131- fprintf (fp_cpp, " Compile* C = Compile::current();\n " );
3132- fprintf (fp_cpp, " C->set_unique(C->unique() - 1);\n " );
3133- fprintf (fp_cpp, " }\n " );
3134- }
3135- fprintf (fp_cpp, " \n " );
3136- }
3137-
31383102// ------------------------------defineClasses----------------------------------
31393103// Define members of MachNode and MachOper classes based on
31403104// operand and instruction lists
@@ -3230,7 +3194,6 @@ void ArchDesc::defineClasses(FILE *fp) {
32303194 defineOut_RegMask (_CPP_MISC_file._fp , instr->_ident , reg_mask (*instr));
32313195 }
32323196
3233- bool used = false ;
32343197 // Output the definitions for expand rules & peephole rules
32353198 _instructions.reset ();
32363199 for ( ; (instr = (InstructForm*)_instructions.iter ()) != nullptr ; ) {
@@ -3249,15 +3212,12 @@ void ArchDesc::defineClasses(FILE *fp) {
32493212 definePeephole (_CPP_PEEPHOLE_file._fp , instr);
32503213
32513214 // Output code to convert to the cisc version, if applicable
3252- used |= instr->define_cisc_version (*this , fp);
3215+ instr->define_cisc_version (*this , fp);
32533216
32543217 // Output code to convert to the short branch version, if applicable
3255- used |= instr->define_short_branch_methods (*this , fp);
3218+ instr->define_short_branch_methods (*this , fp);
32563219 }
32573220
3258- // Construct the method called by cisc_version() to copy inputs and operands.
3259- define_fill_new_machnode (used, fp);
3260-
32613221 // Output the definitions for labels
32623222 _instructions.reset ();
32633223 while ( (instr = (InstructForm*)_instructions.iter ()) != nullptr ) {
@@ -4074,7 +4034,7 @@ void InstructForm::declare_cisc_version(ArchDesc &AD, FILE *fp_hpp) {
40744034
40754035// ---------------------------define_cisc_version-------------------------------
40764036// Build CISC version of this instruction
4077- bool InstructForm::define_cisc_version (ArchDesc & AD, FILE * fp_cpp) {
4037+ void InstructForm::define_cisc_version (ArchDesc& AD, FILE* fp_cpp) {
40784038 InstructForm *inst_cisc = this ->cisc_spill_alternate ();
40794039 if ( AD.can_cisc_spill () && (inst_cisc != nullptr ) ) {
40804040 const char *name = inst_cisc->_ident ;
@@ -4120,9 +4080,7 @@ bool InstructForm::define_cisc_version(ArchDesc &AD, FILE *fp_cpp) {
41204080 fprintf (fp_cpp, " return node;\n " );
41214081 fprintf (fp_cpp, " }\n " );
41224082 fprintf (fp_cpp, " \n " );
4123- return true ;
41244083 }
4125- return false ;
41264084}
41274085
41284086// ---------------------------declare_short_branch_methods----------------------
@@ -4135,7 +4093,7 @@ void InstructForm::declare_short_branch_methods(FILE *fp_hpp) {
41354093
41364094// ---------------------------define_short_branch_methods-----------------------
41374095// Build definitions for short branch methods
4138- bool InstructForm::define_short_branch_methods (ArchDesc & AD, FILE * fp_cpp) {
4096+ void InstructForm::define_short_branch_methods (ArchDesc& AD, FILE* fp_cpp) {
41394097 if (has_short_branch_form ()) {
41404098 InstructForm *short_branch = short_branch_form ();
41414099 const char *name = short_branch->_ident ;
@@ -4164,9 +4122,7 @@ bool InstructForm::define_short_branch_methods(ArchDesc &AD, FILE *fp_cpp) {
41644122 fprintf (fp_cpp, " return node;\n " );
41654123 fprintf (fp_cpp, " }\n " );
41664124 fprintf (fp_cpp," \n " );
4167- return true ;
41684125 }
4169- return false ;
41704126}
41714127
41724128
0 commit comments