src/hotspot/share/adlc/output_c.cpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 51566 904cf5407ac7
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
  2375 
  2375 
  2376   void emit_rep_var(const char *rep_var) {
  2376   void emit_rep_var(const char *rep_var) {
  2377     _processing_noninput = false;
  2377     _processing_noninput = false;
  2378     // A replacement variable, originally '$'
  2378     // A replacement variable, originally '$'
  2379     if ( Opcode::as_opcode_type(rep_var) != Opcode::NOT_AN_OPCODE ) {
  2379     if ( Opcode::as_opcode_type(rep_var) != Opcode::NOT_AN_OPCODE ) {
  2380       if (!_inst._opcode->print_opcode(_fp, Opcode::as_opcode_type(rep_var) )) {
  2380       if ((_inst._opcode == NULL) || !_inst._opcode->print_opcode(_fp, Opcode::as_opcode_type(rep_var) )) {
  2381         // Missing opcode
  2381         // Missing opcode
  2382         _AD.syntax_err( _inst._linenum,
  2382         _AD.syntax_err( _inst._linenum,
  2383                         "Missing $%s opcode definition in %s, used by encoding %s\n",
  2383                         "Missing $%s opcode definition in %s, used by encoding %s\n",
  2384                         rep_var, _inst._ident, _encoding._name);
  2384                         rep_var, _inst._ident, _encoding._name);
  2385       }
  2385       }
  2431         _constant_status = LITERAL_OUTPUT;
  2431         _constant_status = LITERAL_OUTPUT;
  2432       }
  2432       }
  2433       else if( Opcode::as_opcode_type(inst_rep_var) != Opcode::NOT_AN_OPCODE ) {
  2433       else if( Opcode::as_opcode_type(inst_rep_var) != Opcode::NOT_AN_OPCODE ) {
  2434         // else check if "primary", "secondary", "tertiary"
  2434         // else check if "primary", "secondary", "tertiary"
  2435         assert( _constant_status == LITERAL_ACCESSED, "Must be processing a literal constant parameter");
  2435         assert( _constant_status == LITERAL_ACCESSED, "Must be processing a literal constant parameter");
  2436         if (!_inst._opcode->print_opcode(_fp, Opcode::as_opcode_type(inst_rep_var) )) {
  2436         if ((_inst._opcode == NULL) || !_inst._opcode->print_opcode(_fp, Opcode::as_opcode_type(inst_rep_var) )) {
  2437           // Missing opcode
  2437           // Missing opcode
  2438           _AD.syntax_err( _inst._linenum,
  2438           _AD.syntax_err( _inst._linenum,
  2439                           "Missing $%s opcode definition in %s\n",
  2439                           "Missing $%s opcode definition in %s\n",
  2440                           rep_var, _inst._ident);
  2440                           rep_var, _inst._ident);
  2441 
  2441 
  3935   }
  3935   }
  3936   if( inst->is_ideal_if() ) {
  3936   if( inst->is_ideal_if() ) {
  3937     fprintf(fp_cpp, "%s node->_prob = _leaf->as_If()->_prob;\n", indent);
  3937     fprintf(fp_cpp, "%s node->_prob = _leaf->as_If()->_prob;\n", indent);
  3938     fprintf(fp_cpp, "%s node->_fcnt = _leaf->as_If()->_fcnt;\n", indent);
  3938     fprintf(fp_cpp, "%s node->_fcnt = _leaf->as_If()->_fcnt;\n", indent);
  3939   }
  3939   }
       
  3940   if (inst->is_ideal_halt()) {
       
  3941     fprintf(fp_cpp, "%s node->_halt_reason = _leaf->as_Halt()->_halt_reason;\n", indent);
       
  3942   }
  3940   if (inst->is_ideal_jump()) {
  3943   if (inst->is_ideal_jump()) {
  3941     fprintf(fp_cpp, "%s node->_probs = _leaf->as_Jump()->_probs;\n", indent);
  3944     fprintf(fp_cpp, "%s node->_probs = _leaf->as_Jump()->_probs;\n", indent);
  3942   }
  3945   }
  3943   if( inst->is_ideal_fastlock() ) {
  3946   if( inst->is_ideal_fastlock() ) {
  3944     fprintf(fp_cpp, "%s node->_counters = _leaf->as_FastLock()->counters();\n", indent);
  3947     fprintf(fp_cpp, "%s node->_counters = _leaf->as_FastLock()->counters();\n", indent);