< prev index next >

src/share/vm/adlc/output_c.cpp

Print this page




3229       } else {
3230         defineEmit(fp, *instr);
3231       }
3232     }
3233     if (instr->is_mach_constant()) defineEvalConstant(fp, *instr);
3234     if (instr->_size)              defineSize        (fp, *instr);
3235 
3236     // side-call to generate output that used to be in the header file:
3237     extern void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &oper, bool for_c_file);
3238     gen_inst_format(_CPP_FORMAT_file._fp, _globalNames, *instr, true);
3239   }
3240 
3241   // Output the definitions for alias analysis
3242   _instructions.reset();
3243   for( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
3244     // Ensure this is a machine-world instruction
3245     if ( instr->ideal_only() ) continue;
3246 
3247     // Analyze machine instructions that either USE or DEF memory.
3248     int memory_operand = instr->memory_operand(_globalNames);
3249     // Some guys kill all of memory
3250     if ( instr->is_wide_memory_kill(_globalNames) ) {
3251       memory_operand = InstructForm::MANY_MEMORY_OPERANDS;
3252     }
3253 
3254     if ( memory_operand != InstructForm::NO_MEMORY_OPERAND ) {
3255       if( memory_operand == InstructForm::MANY_MEMORY_OPERANDS ) {
3256         fprintf(fp,"const TypePtr *%sNode::adr_type() const { return TypePtr::BOTTOM; }\n", instr->_ident);
3257         fprintf(fp,"const MachOper* %sNode::memory_operand() const { return (MachOper*)-1; }\n", instr->_ident);
3258       } else {
3259         fprintf(fp,"const MachOper* %sNode::memory_operand() const { return _opnds[%d]; }\n", instr->_ident, memory_operand);
3260   }
3261     }
3262   }
3263 
3264   // Get the length of the longest identifier
3265   int max_ident_len = 0;
3266   _instructions.reset();
3267 
3268   for ( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
3269     if (instr->_ins_pipe && _pipeline->_classlist.search(instr->_ins_pipe)) {
3270       int ident_len = (int)strlen(instr->_ident);
3271       if( max_ident_len < ident_len )
3272         max_ident_len = ident_len;




3229       } else {
3230         defineEmit(fp, *instr);
3231       }
3232     }
3233     if (instr->is_mach_constant()) defineEvalConstant(fp, *instr);
3234     if (instr->_size)              defineSize        (fp, *instr);
3235 
3236     // side-call to generate output that used to be in the header file:
3237     extern void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &oper, bool for_c_file);
3238     gen_inst_format(_CPP_FORMAT_file._fp, _globalNames, *instr, true);
3239   }
3240 
3241   // Output the definitions for alias analysis
3242   _instructions.reset();
3243   for( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
3244     // Ensure this is a machine-world instruction
3245     if ( instr->ideal_only() ) continue;
3246 
3247     // Analyze machine instructions that either USE or DEF memory.
3248     int memory_operand = instr->memory_operand(_globalNames);




3249 
3250     if ( memory_operand != InstructForm::NO_MEMORY_OPERAND ) {
3251       if( memory_operand == InstructForm::MANY_MEMORY_OPERANDS ) {
3252         fprintf(fp,"const TypePtr *%sNode::adr_type() const { return TypePtr::BOTTOM; }\n", instr->_ident);
3253         fprintf(fp,"const MachOper* %sNode::memory_operand() const { return (MachOper*)-1; }\n", instr->_ident);
3254       } else {
3255         fprintf(fp,"const MachOper* %sNode::memory_operand() const { return _opnds[%d]; }\n", instr->_ident, memory_operand);
3256   }
3257     }
3258   }
3259 
3260   // Get the length of the longest identifier
3261   int max_ident_len = 0;
3262   _instructions.reset();
3263 
3264   for ( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
3265     if (instr->_ins_pipe && _pipeline->_classlist.search(instr->_ins_pipe)) {
3266       int ident_len = (int)strlen(instr->_ident);
3267       if( max_ident_len < ident_len )
3268         max_ident_len = ident_len;


< prev index next >