1117 |
1117 |
1118 fprintf(fp_hpp, " enum {\n"); |
1118 fprintf(fp_hpp, " enum {\n"); |
1119 fprintf(fp_hpp, " _nop_count = %d\n", |
1119 fprintf(fp_hpp, " _nop_count = %d\n", |
1120 _pipeline->_nopcnt); |
1120 _pipeline->_nopcnt); |
1121 fprintf(fp_hpp, " };\n\n"); |
1121 fprintf(fp_hpp, " };\n\n"); |
1122 fprintf(fp_hpp, " static void initialize_nops(MachNode *nop_list[%d], Compile* C);\n\n", |
1122 fprintf(fp_hpp, " static void initialize_nops(MachNode *nop_list[%d]);\n\n", |
1123 _pipeline->_nopcnt); |
1123 _pipeline->_nopcnt); |
1124 fprintf(fp_hpp, "#ifndef PRODUCT\n"); |
1124 fprintf(fp_hpp, "#ifndef PRODUCT\n"); |
1125 fprintf(fp_hpp, " void dump(outputStream *st = tty) const;\n"); |
1125 fprintf(fp_hpp, " void dump(outputStream *st = tty) const;\n"); |
1126 fprintf(fp_hpp, "#endif\n"); |
1126 fprintf(fp_hpp, "#endif\n"); |
1127 fprintf(fp_hpp, "};\n\n"); |
1127 fprintf(fp_hpp, "};\n\n"); |
1238 defineConstructor(fp, oper->_ident, oper->num_consts(_globalNames), |
1238 defineConstructor(fp, oper->_ident, oper->num_consts(_globalNames), |
1239 oper->_components, oper->is_ideal_bool(), |
1239 oper->_components, oper->is_ideal_bool(), |
1240 constant_type, _globalNames); |
1240 constant_type, _globalNames); |
1241 |
1241 |
1242 // Clone function |
1242 // Clone function |
1243 fprintf(fp," virtual MachOper *clone(Compile* C) const;\n"); |
1243 fprintf(fp," virtual MachOper *clone() const;\n"); |
1244 |
1244 |
1245 // Support setting a spill offset into a constant operand. |
1245 // Support setting a spill offset into a constant operand. |
1246 // We only support setting an 'int' offset, while in the |
1246 // We only support setting an 'int' offset, while in the |
1247 // LP64 build spill offsets are added with an AddP which |
1247 // LP64 build spill offsets are added with an AddP which |
1248 // requires a long constant. Thus we don't support spilling |
1248 // requires a long constant. Thus we don't support spilling |
1716 // MachNode *cisc_version( int offset /* ,... */ ); |
1716 // MachNode *cisc_version( int offset /* ,... */ ); |
1717 instr->declare_cisc_version(*this, fp); |
1717 instr->declare_cisc_version(*this, fp); |
1718 |
1718 |
1719 // If there is an explicit peephole rule, build it |
1719 // If there is an explicit peephole rule, build it |
1720 if ( instr->peepholes() != NULL ) { |
1720 if ( instr->peepholes() != NULL ) { |
1721 fprintf(fp," virtual MachNode *peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile *C);\n"); |
1721 fprintf(fp," virtual MachNode *peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted);\n"); |
1722 } |
1722 } |
1723 |
1723 |
1724 // Output the declaration for number of relocation entries |
1724 // Output the declaration for number of relocation entries |
1725 if ( instr->reloc(_globalNames) != 0 ) { |
1725 if ( instr->reloc(_globalNames) != 0 ) { |
1726 fprintf(fp," virtual int reloc() const;\n"); |
1726 fprintf(fp," virtual int reloc() const;\n"); |
1861 if (instr->is_projection(_globalNames)) { |
1861 if (instr->is_projection(_globalNames)) { |
1862 fprintf(fp," virtual const Node *is_block_proj() const { return this; }\n"); |
1862 fprintf(fp," virtual const Node *is_block_proj() const { return this; }\n"); |
1863 } |
1863 } |
1864 if ( instr->num_post_match_opnds() != 0 |
1864 if ( instr->num_post_match_opnds() != 0 |
1865 || instr->is_chain_of_constant(_globalNames) ) { |
1865 || instr->is_chain_of_constant(_globalNames) ) { |
1866 fprintf(fp," friend MachNode *State::MachNodeGenerator(int opcode, Compile* C);\n"); |
1866 fprintf(fp," friend MachNode *State::MachNodeGenerator(int opcode);\n"); |
1867 } |
1867 } |
1868 if ( instr->rematerialize(_globalNames, get_registers()) ) { |
1868 if ( instr->rematerialize(_globalNames, get_registers()) ) { |
1869 fprintf(fp," // Rematerialize %s\n", instr->_ident); |
1869 fprintf(fp," // Rematerialize %s\n", instr->_ident); |
1870 } |
1870 } |
1871 |
1871 |
2069 fprintf(fp,"\n"); |
2069 fprintf(fp,"\n"); |
2070 fprintf(fp," State(void); // Constructor\n"); |
2070 fprintf(fp," State(void); // Constructor\n"); |
2071 fprintf(fp," DEBUG_ONLY( ~State(void); ) // Destructor\n"); |
2071 fprintf(fp," DEBUG_ONLY( ~State(void); ) // Destructor\n"); |
2072 fprintf(fp,"\n"); |
2072 fprintf(fp,"\n"); |
2073 fprintf(fp," // Methods created by ADLC and invoked by Reduce\n"); |
2073 fprintf(fp," // Methods created by ADLC and invoked by Reduce\n"); |
2074 fprintf(fp," MachOper *MachOperGenerator( int opcode, Compile* C );\n"); |
2074 fprintf(fp," MachOper *MachOperGenerator(int opcode);\n"); |
2075 fprintf(fp," MachNode *MachNodeGenerator( int opcode, Compile* C );\n"); |
2075 fprintf(fp," MachNode *MachNodeGenerator(int opcode);\n"); |
2076 fprintf(fp,"\n"); |
2076 fprintf(fp,"\n"); |
2077 fprintf(fp," // Assign a state to a node, definition of method produced by ADLC\n"); |
2077 fprintf(fp," // Assign a state to a node, definition of method produced by ADLC\n"); |
2078 fprintf(fp," bool DFA( int opcode, const Node *ideal );\n"); |
2078 fprintf(fp," bool DFA( int opcode, const Node *ideal );\n"); |
2079 fprintf(fp,"\n"); |
2079 fprintf(fp,"\n"); |
2080 fprintf(fp," // Access function for _valid bit vector\n"); |
2080 fprintf(fp," // Access function for _valid bit vector\n"); |