< prev index next >

src/hotspot/share/adlc/output_h.cpp

Print this page




1985       // Special hack for tlsLoadP
1986       fprintf(fp,"  const Type            *bottom_type() const { return TypeRawPtr::BOTTOM; } // tlsLoadP\n");
1987     }
1988     else if ( instr->is_ideal_if() ) {
1989       fprintf(fp,"  const Type            *bottom_type() const { return TypeTuple::IFBOTH; } // matched IfNode\n");
1990     }
1991     else if ( instr->is_ideal_membar() ) {
1992       fprintf(fp,"  const Type            *bottom_type() const { return TypeTuple::MEMBAR; } // matched MemBar\n");
1993     }
1994 
1995     // Check where 'ideal_type' must be customized
1996     /*
1997     if ( instr->_matrule && instr->_matrule->_rChild &&
1998         (  strcmp("ConvF2I",instr->_matrule->_rChild->_opType)==0
1999         || strcmp("ConvD2I",instr->_matrule->_rChild->_opType)==0 ) ) {
2000       fprintf(fp,"  virtual uint           ideal_reg() const { return Compile::current()->matcher()->base2reg[Type::Int]; }\n");
2001     }*/
2002 
2003     // Analyze machine instructions that either USE or DEF memory.
2004     int memory_operand = instr->memory_operand(_globalNames);
2005     // Some guys kill all of memory
2006     if ( instr->is_wide_memory_kill(_globalNames) ) {
2007       memory_operand = InstructForm::MANY_MEMORY_OPERANDS;
2008     }
2009     if ( memory_operand != InstructForm::NO_MEMORY_OPERAND ) {
2010       if( memory_operand == InstructForm::MANY_MEMORY_OPERANDS ) {
2011         fprintf(fp,"  virtual const TypePtr *adr_type() const;\n");
2012       }
2013       fprintf(fp,"  virtual const MachOper *memory_operand() const;\n");
2014     }
2015 
2016     fprintf(fp, "#ifndef PRODUCT\n");
2017 
2018     // virtual function for generating the user's assembler output
2019     gen_inst_format(fp, _globalNames,*instr);
2020 
2021     // Machine independent print functionality for debugging
2022     fprintf(fp,"  virtual const char    *Name() const { return \"%s\";}\n",
2023             instr->_ident);
2024 
2025     fprintf(fp, "#endif\n");
2026 
2027     // Close definition of this XxxMachNode
2028     fprintf(fp,"};\n");




1985       // Special hack for tlsLoadP
1986       fprintf(fp,"  const Type            *bottom_type() const { return TypeRawPtr::BOTTOM; } // tlsLoadP\n");
1987     }
1988     else if ( instr->is_ideal_if() ) {
1989       fprintf(fp,"  const Type            *bottom_type() const { return TypeTuple::IFBOTH; } // matched IfNode\n");
1990     }
1991     else if ( instr->is_ideal_membar() ) {
1992       fprintf(fp,"  const Type            *bottom_type() const { return TypeTuple::MEMBAR; } // matched MemBar\n");
1993     }
1994 
1995     // Check where 'ideal_type' must be customized
1996     /*
1997     if ( instr->_matrule && instr->_matrule->_rChild &&
1998         (  strcmp("ConvF2I",instr->_matrule->_rChild->_opType)==0
1999         || strcmp("ConvD2I",instr->_matrule->_rChild->_opType)==0 ) ) {
2000       fprintf(fp,"  virtual uint           ideal_reg() const { return Compile::current()->matcher()->base2reg[Type::Int]; }\n");
2001     }*/
2002 
2003     // Analyze machine instructions that either USE or DEF memory.
2004     int memory_operand = instr->memory_operand(_globalNames);




2005     if ( memory_operand != InstructForm::NO_MEMORY_OPERAND ) {
2006       if( memory_operand == InstructForm::MANY_MEMORY_OPERANDS ) {
2007         fprintf(fp,"  virtual const TypePtr *adr_type() const;\n");
2008       }
2009       fprintf(fp,"  virtual const MachOper *memory_operand() const;\n");
2010     }
2011 
2012     fprintf(fp, "#ifndef PRODUCT\n");
2013 
2014     // virtual function for generating the user's assembler output
2015     gen_inst_format(fp, _globalNames,*instr);
2016 
2017     // Machine independent print functionality for debugging
2018     fprintf(fp,"  virtual const char    *Name() const { return \"%s\";}\n",
2019             instr->_ident);
2020 
2021     fprintf(fp, "#endif\n");
2022 
2023     // Close definition of this XxxMachNode
2024     fprintf(fp,"};\n");


< prev index next >