formsopt.cpp revision 2964
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This code is free software; you can redistribute it and/or modify it
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * under the terms of the GNU General Public License version 2 only, as
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * published by the Free Software Foundation.
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * This code is distributed in the hope that it will be useful, but WITHOUT
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * version 2 for more details (a copy is included in the LICENSE file that
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * accompanied this code).
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * You should have received a copy of the GNU General Public License version
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * 2 along with this work; if not, write to the Free Software Foundation,
48dfee71508886d86fe8fb12f91961b5daf3141dMark Andrews * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
* or visit www.oracle.com if you need additional information or have any
// FORMS.CPP - Definitions for ADL Parser Forms Classes
#include "adlc.hpp"
return regClass;
return allocClass;
// for spill-slots/regs.
return iter_RegDefs();
return reg_def;
return regDef;
return regClass;
bool valid = true;
return valid;
const char *name;
RegDef::RegDef(char *regname, char *callconv, char *c_conv, char * idealtype, char * encode, char * concrete)
_register_num(0) {
return _register_encode;
return _register_num;
RegClass::RegClass(const char *classid) : _stack_or_reg(false), _classid(classid), _regDef(cmpstr,hashstr, Form::arena),
return reg_def;
reset();
return first;;
int word = 0;
const char *name;
if( stack_also ) {
return word;
const char *name;
const char *name;
: _reslist ()
, _rescount (0)
, _maxcycleused (0)
, _stages ()
, _stagecnt (0)
, _classlist ()
, _classcnt (0)
, _noplist ()
, _nopcnt (0)
, _variableSizeInstrs (false)
, _branchHasDelaySlot (false)
, _maxInstrsPerBundle (0)
, _instrUnitSize (0)
, _bundleUnitSize (0)
, _instrFetchUnitSize (0)
, _instrFetchUnits (0) {
const char *res;
const char *stage;
const char *cls;
const char *nop;
int count = 0;
if (_variableSizeInstrs)
if (_instrUnitSize > 0)
if (_instrUnitSize > 0)
else if (_bundleUnitSize > 0)
if (_branchHasDelaySlot)
if (_maxInstrsPerBundle > 0)
if (_maxBundlesPerCycle > 0)
return (ResourceForm *)(this);
if (_more_instrs > 0)
if (_more_instrs > 0)
, _has_fixed_latency(0)
, _fixed_latency(0)
, _instruction_count(0)
, _has_multiple_bundles(false)
, _has_branch_delay_slot(false)
, _force_serialization(false)
, _may_have_no_code(false) {
return (PipeClassForm *)(this);
if (_ident)
if (_has_fixed_latency)
if (_force_serialization)
if (_may_have_no_code)
int input) {
return _max_position;
return _next;