< prev index next >

src/hotspot/share/adlc/output_c.cpp

Print this page




3919       path_to_constant(fp_cpp, _globalNames, op->_matrule, i);
3920       for ( i = 1; i < num_consts; ++i ) {
3921         fprintf(fp_cpp, ", ");
3922         path_to_constant(fp_cpp, _globalNames, op->_matrule, i);
3923       }
3924     }
3925     fprintf(fp_cpp, " );\n");
3926     // #####
3927   }
3928 
3929   // Fill in the bottom_type where requested
3930   if (inst->captures_bottom_type(_globalNames)) {
3931     if (strncmp("MachCall", inst->mach_base_class(_globalNames), strlen("MachCall"))) {
3932       fprintf(fp_cpp, "%s node->_bottom_type = _leaf->bottom_type();\n", indent);
3933     }
3934   }
3935   if( inst->is_ideal_if() ) {
3936     fprintf(fp_cpp, "%s node->_prob = _leaf->as_If()->_prob;\n", indent);
3937     fprintf(fp_cpp, "%s node->_fcnt = _leaf->as_If()->_fcnt;\n", indent);
3938   }



3939   if( inst->is_ideal_fastlock() ) {
3940     fprintf(fp_cpp, "%s node->_counters = _leaf->as_FastLock()->counters();\n", indent);
3941     fprintf(fp_cpp, "%s node->_rtm_counters = _leaf->as_FastLock()->rtm_counters();\n", indent);
3942     fprintf(fp_cpp, "%s node->_stack_rtm_counters = _leaf->as_FastLock()->stack_rtm_counters();\n", indent);
3943   }
3944 
3945 }
3946 
3947 //---------------------------declare_cisc_version------------------------------
3948 // Build CISC version of this instruction
3949 void InstructForm::declare_cisc_version(ArchDesc &AD, FILE *fp_hpp) {
3950   if( AD.can_cisc_spill() ) {
3951     InstructForm *inst_cisc = cisc_spill_alternate();
3952     if (inst_cisc != NULL) {
3953       fprintf(fp_hpp, "  virtual int            cisc_operand() const { return %d; }\n", cisc_spill_operand());
3954       fprintf(fp_hpp, "  virtual MachNode      *cisc_version(int offset);\n");
3955       fprintf(fp_hpp, "  virtual void           use_cisc_RegMask();\n");
3956       fprintf(fp_hpp, "  virtual const RegMask *cisc_RegMask() const { return _cisc_RegMask; }\n");
3957     }
3958   }




3919       path_to_constant(fp_cpp, _globalNames, op->_matrule, i);
3920       for ( i = 1; i < num_consts; ++i ) {
3921         fprintf(fp_cpp, ", ");
3922         path_to_constant(fp_cpp, _globalNames, op->_matrule, i);
3923       }
3924     }
3925     fprintf(fp_cpp, " );\n");
3926     // #####
3927   }
3928 
3929   // Fill in the bottom_type where requested
3930   if (inst->captures_bottom_type(_globalNames)) {
3931     if (strncmp("MachCall", inst->mach_base_class(_globalNames), strlen("MachCall"))) {
3932       fprintf(fp_cpp, "%s node->_bottom_type = _leaf->bottom_type();\n", indent);
3933     }
3934   }
3935   if( inst->is_ideal_if() ) {
3936     fprintf(fp_cpp, "%s node->_prob = _leaf->as_If()->_prob;\n", indent);
3937     fprintf(fp_cpp, "%s node->_fcnt = _leaf->as_If()->_fcnt;\n", indent);
3938   }
3939   if (inst->is_ideal_jump()) {
3940     fprintf(fp_cpp, "%s node->_probs = _leaf->as_Jump()->_probs;\n", indent);
3941   }
3942   if( inst->is_ideal_fastlock() ) {
3943     fprintf(fp_cpp, "%s node->_counters = _leaf->as_FastLock()->counters();\n", indent);
3944     fprintf(fp_cpp, "%s node->_rtm_counters = _leaf->as_FastLock()->rtm_counters();\n", indent);
3945     fprintf(fp_cpp, "%s node->_stack_rtm_counters = _leaf->as_FastLock()->stack_rtm_counters();\n", indent);
3946   }
3947 
3948 }
3949 
3950 //---------------------------declare_cisc_version------------------------------
3951 // Build CISC version of this instruction
3952 void InstructForm::declare_cisc_version(ArchDesc &AD, FILE *fp_hpp) {
3953   if( AD.can_cisc_spill() ) {
3954     InstructForm *inst_cisc = cisc_spill_alternate();
3955     if (inst_cisc != NULL) {
3956       fprintf(fp_hpp, "  virtual int            cisc_operand() const { return %d; }\n", cisc_spill_operand());
3957       fprintf(fp_hpp, "  virtual MachNode      *cisc_version(int offset);\n");
3958       fprintf(fp_hpp, "  virtual void           use_cisc_RegMask();\n");
3959       fprintf(fp_hpp, "  virtual const RegMask *cisc_RegMask() const { return _cisc_RegMask; }\n");
3960     }
3961   }


< prev index next >