hotspot/src/share/vm/adlc/formssel.cpp
changeset 24424 2658d7834c6e
parent 23220 fc827339dc37
child 26910 253efabfd968
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2014, 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.
  1320     // This component isn't in the input array.  Print out the static
  1320     // This component isn't in the input array.  Print out the static
  1321     // name of the register.
  1321     // name of the register.
  1322     OperandForm* oper = form->is_operand();
  1322     OperandForm* oper = form->is_operand();
  1323     if (oper != NULL && oper->is_bound_register()) {
  1323     if (oper != NULL && oper->is_bound_register()) {
  1324       const RegDef* first = oper->get_RegClass()->find_first_elem();
  1324       const RegDef* first = oper->get_RegClass()->find_first_elem();
  1325       fprintf(fp, "    st->print(\"%s\");\n", first->_regname);
  1325       fprintf(fp, "    st->print_raw(\"%s\");\n", first->_regname);
  1326     } else {
  1326     } else {
  1327       globalAD->syntax_err(_linenum, "In %s can't find format for %s %s", _ident, opc->_ident, rep_var);
  1327       globalAD->syntax_err(_linenum, "In %s can't find format for %s %s", _ident, opc->_ident, rep_var);
  1328     }
  1328     }
  1329   } else {
  1329   } else {
  1330     // Output the format call for this operand
  1330     // Output the format call for this operand
  2528   switch(const_type) {
  2528   switch(const_type) {
  2529   case Form::idealI: fprintf(fp,"  st->print(\"#%%d\", _c%d);\n", const_index); break;
  2529   case Form::idealI: fprintf(fp,"  st->print(\"#%%d\", _c%d);\n", const_index); break;
  2530   case Form::idealP: fprintf(fp,"  if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break;
  2530   case Form::idealP: fprintf(fp,"  if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break;
  2531   case Form::idealNKlass:
  2531   case Form::idealNKlass:
  2532   case Form::idealN: fprintf(fp,"  if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break;
  2532   case Form::idealN: fprintf(fp,"  if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break;
  2533   case Form::idealL: fprintf(fp,"  st->print(\"#%%lld\", _c%d);\n", const_index); break;
  2533   case Form::idealL: fprintf(fp,"  st->print(\"#\" INT64_FORMAT, (int64_t)_c%d);\n", const_index); break;
  2534   case Form::idealF: fprintf(fp,"  st->print(\"#%%f\", _c%d);\n", const_index); break;
  2534   case Form::idealF: fprintf(fp,"  st->print(\"#%%f\", _c%d);\n", const_index); break;
  2535   case Form::idealD: fprintf(fp,"  st->print(\"#%%f\", _c%d);\n", const_index); break;
  2535   case Form::idealD: fprintf(fp,"  st->print(\"#%%f\", _c%d);\n", const_index); break;
  2536   default:
  2536   default:
  2537     assert( false, "ShouldNotReachHere()");
  2537     assert( false, "ShouldNotReachHere()");
  2538   }
  2538   }