< prev index next >

src/hotspot/share/adlc/output_c.cpp

Print this page




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




3246       } else {
3247         defineEmit(fp, *instr);
3248       }
3249     }
3250     if (instr->is_mach_constant()) defineEvalConstant(fp, *instr);
3251     if (instr->_size)              defineSize        (fp, *instr);
3252 
3253     // side-call to generate output that used to be in the header file:
3254     extern void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &oper, bool for_c_file);
3255     gen_inst_format(_CPP_FORMAT_file._fp, _globalNames, *instr, true);
3256   }
3257 
3258   // Output the definitions for alias analysis
3259   _instructions.reset();
3260   for( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
3261     // Ensure this is a machine-world instruction
3262     if ( instr->ideal_only() ) continue;
3263 
3264     // Analyze machine instructions that either USE or DEF memory.
3265     int memory_operand = instr->memory_operand(_globalNames);




3266 
3267     if ( memory_operand != InstructForm::NO_MEMORY_OPERAND ) {
3268       if( memory_operand == InstructForm::MANY_MEMORY_OPERANDS ) {
3269         fprintf(fp,"const TypePtr *%sNode::adr_type() const { return TypePtr::BOTTOM; }\n", instr->_ident);
3270         fprintf(fp,"const MachOper* %sNode::memory_operand() const { return (MachOper*)-1; }\n", instr->_ident);
3271       } else {
3272         fprintf(fp,"const MachOper* %sNode::memory_operand() const { return _opnds[%d]; }\n", instr->_ident, memory_operand);
3273   }
3274     }
3275   }
3276 
3277   // Get the length of the longest identifier
3278   int max_ident_len = 0;
3279   _instructions.reset();
3280 
3281   for ( ; (instr = (InstructForm*)_instructions.iter()) != NULL; ) {
3282     if (instr->_ins_pipe && _pipeline->_classlist.search(instr->_ins_pipe)) {
3283       int ident_len = (int)strlen(instr->_ident);
3284       if( max_ident_len < ident_len )
3285         max_ident_len = ident_len;


< prev index next >