src/hotspot/share/adlc/archDesc.hpp
author coleenp
Thu, 10 Jan 2019 15:13:51 -0500
changeset 53244 9807daeb47c4
parent 47216 71c04702a3d5
permissions -rw-r--r--
8216167: Update include guards to reflect correct directories Summary: Use script and some manual fixup to fix directores names in include guards. Reviewed-by: lfoltan, eosterlund, kbarrett
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
     2
 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
    25
#ifndef SHARE_ADLC_ARCHDESC_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
    26
#define SHARE_ADLC_ARCHDESC_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
// Definitions for Error Flags
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
#define  WARN   0
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
#define  SYNERR 1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
#define  SEMERR 2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
#define  INTERNAL_ERR 3
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
// Minimal declarations for include files
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
class  OutputMap;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
class  ProductionState;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
class  Expr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
// STRUCTURE FOR HANDLING INPUT AND OUTPUT FILES
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
typedef BufferedFile ADLFILE;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
//---------------------------ChainList-----------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
class ChainList {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  NameList _name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  NameList _cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  NameList _rule;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  void insert(const char *name, const char *cost, const char *rule);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  bool search(const char *name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  void reset();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  bool iter(const char * &name, const char * &cost, const char * &rule);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  ChainList();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  ~ChainList();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
//---------------------------MatchList-----------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
class MatchList {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  MatchList  *_next;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  Predicate  *_pred;          // Predicate which applies to this match rule
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  const char *_cost;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  const char *_opcode;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  const char *_resultStr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  const char *_lchild;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  const char *_rchild;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  MatchList(MatchList *nxt, Predicate *prd): _next(nxt), _pred(prd), _cost(NULL){
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
    _resultStr = _lchild = _rchild = _opcode = NULL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  MatchList(MatchList *nxt, Predicate *prd, const char *cost,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
            const char *opcode, const char *resultStr, const char *lchild,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
            const char *rchild)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    : _next(nxt), _pred(prd), _cost(cost), _opcode(opcode),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
      _resultStr(resultStr), _lchild(lchild), _rchild(rchild) { }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  MatchList  *get_next(void)  { return _next; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  char       *get_pred(void)  { return (_pred?_pred->_pred:NULL); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  Predicate  *get_pred_obj(void)  { return _pred; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  const char *get_cost(void) { return _cost == NULL ? "0" :_cost; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  bool        search(const char *opc, const char *res, const char *lch,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
                    const char *rch, Predicate *pr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  void        dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  void        output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
//---------------------------ArchDesc------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
class ArchDesc {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  FormDict      _globalNames;        // Global names
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  Dict          _idealIndex;         // Map ideal names to index in enumeration
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  ExprDict      _globalDefs;         // Global definitions, #defines
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  int           _internalOpCounter;  // Internal Operand Counter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  FormList      _header;             // List of Source Code Forms for hpp file
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  FormList      _pre_header;         // ditto for the very top of the hpp file
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  FormList      _source;             // List of Source Code Forms for output
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  FormList      _instructions;       // List of Instruction Forms for output
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  FormList      _machnodes;          // List of Node Classes (special for pipelining)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  FormList      _operands;           // List of Operand Forms for output
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  FormList      _opclass;            // List of Operand Class Forms for output
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  FormList      _attributes;         // List of Attribute Forms for parsing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  RegisterForm *_register;           // Only one Register Form allowed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  FrameForm    *_frame;              // Describe stack-frame layout
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  EncodeForm   *_encode;             // Only one Encode Form allowed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  PipelineForm *_pipeline;           // Pipeline Form for output
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  bool _has_match_rule[_last_opcode];  // found AD rule for ideal node in <arch>.ad
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  MatchList    *_mlistab[_last_opcode]; // Array of MatchLists
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  // The Architecture Description identifies which user-defined operand can be used
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  // to access [stack_pointer + offset]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  OperandForm  *_cisc_spill_operand;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
22865
3b8857d7b3cc 8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms
goetz
parents: 22844
diff changeset
   124
  // If a Call node uses $constanttablebase, it gets MachConstantBaseNode
3b8857d7b3cc 8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms
goetz
parents: 22844
diff changeset
   125
  // by the matcher and the matcher will modify the jvms. If so, jvm states
3b8857d7b3cc 8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms
goetz
parents: 22844
diff changeset
   126
  // always have to be cloned when a node is cloned.  Adlc generates
3b8857d7b3cc 8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms
goetz
parents: 22844
diff changeset
   127
  // Compile::needs_clone_jvms() accordingly.
3b8857d7b3cc 8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms
goetz
parents: 22844
diff changeset
   128
  bool _needs_clone_jvms;
3b8857d7b3cc 8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms
goetz
parents: 22844
diff changeset
   129
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  // Methods for outputting the DFA
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  void gen_match(FILE *fp, MatchList &mlist, ProductionState &status, Dict &operands_chained_from);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  void chain_rule(FILE *fp, const char *indent, const char *ideal,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
                  const Expr *icost, const char *irule,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
                  Dict &operands_chained_from, ProductionState &status);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  void expand_opclass(FILE *fp, const char *indent, const Expr *cost,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
                      const char *result_type, ProductionState &status);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  Expr *calc_cost(FILE *fp, const char *spaces, MatchList &mList, ProductionState &status);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  void prune_matchlist(Dict &minimize, MatchList &mlist);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  // Helper function that outputs code to generate an instruction in MachNodeGenerator
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  void buildMachNode(FILE *fp_cpp, InstructForm *inst, const char *indent);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  ArchDesc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  ~ArchDesc();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  // Option flags which control miscellaneous behaviors throughout the code
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  int   _TotalLines;                    // Line Counter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  int   _no_output;                     // Flag to disable output of DFA, etc.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  int   _quiet_mode;                    // Do not output banner messages, etc.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  int   _disable_warnings;              // Do not output warning messages
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  int   _dfa_debug;                     // Debug Flag for generated DFA
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  int   _dfa_small;                     // Debug Flag for generated DFA
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  int   _adl_debug;                     // Debug Flag for ADLC
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  int   _adlocation_debug;              // Debug Flag to use ad file locations
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  bool  _cisc_spill_debug;              // Debug Flag to see cisc-spill-instructions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  bool  _short_branch_debug;            // Debug Flag to see short branch instructions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  // Error/Warning Counts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  int _syntax_errs;                  // Count of syntax errors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  int _semantic_errs;                // Count of semantic errors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  int _warnings;                     // Count warnings
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  int _internal_errs;                // Count of internal errors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  // Accessor for private data.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  void has_match_rule(int opc, const bool b) { _has_match_rule[opc] = b; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  // I/O Files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  ADLFILE  _ADL_file;          // Input Architecture Description File
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  // Machine dependent files, built from architecture definition
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  ADLFILE  _DFA_file;          // File for definition of Matcher::DFA
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  ADLFILE  _HPP_file;          // File for ArchNode class declarations
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  ADLFILE  _CPP_file;          // File for ArchNode class defintions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
  ADLFILE  _CPP_CLONE_file;    // File for MachNode/Oper clone defintions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  ADLFILE  _CPP_EXPAND_file;   // File for MachNode expand methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
  ADLFILE  _CPP_FORMAT_file;   // File for MachNode/Oper format defintions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  ADLFILE  _CPP_GEN_file;      // File for MachNode/Oper generator methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  ADLFILE  _CPP_MISC_file;     // File for miscellaneous MachNode/Oper tables & methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
  ADLFILE  _CPP_PEEPHOLE_file; // File for MachNode peephole methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  ADLFILE  _CPP_PIPELINE_file; // File for MachNode pipeline defintions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  ADLFILE  _VM_file;           // File for constants needed in VM code
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  ADLFILE  _bug_file;          // DFA debugging file
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  // I/O helper methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  int  open_file(bool required, ADLFILE & adf, const char *action);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  void close_file(int delete_out, ADLFILE & adf);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  int  open_files(void);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  void close_files(int delete_out);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  Dict _chainRules;            // Maps user operand names to ChainRules
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  Dict _internalOps;           // Maps match strings to internal operand names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  NameList _internalOpNames;   // List internal operand names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  Dict _internalMatch;         // Map internal name to its MatchNode
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  NameList      _preproc_list; // Preprocessor flag names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  FormDict      _preproc_table;// Preprocessor flag bindings
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  char* get_preproc_def(const char* flag);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  void  set_preproc_def(const char* flag, const char* def);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  FormDict& globalNames() {return _globalNames;} // map global names to forms
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
  void initKeywords(FormDict& globals);  // Add keywords to global name table
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  ExprDict& globalDefs()  {return _globalDefs;}  // map global names to expressions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  OperandForm *constructOperand(const char *ident, bool ideal_only);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  void initBaseOpTypes();            // Import predefined base types.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  void addForm(PreHeaderForm *ptr);  // Add objects to pre-header list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  void addForm(HeaderForm *ptr);     // Add objects to header list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  void addForm(SourceForm *ptr);     // Add objects to source list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  void addForm(EncodeForm *ptr);     // Add objects to encode list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  void addForm(InstructForm *ptr);   // Add objects to the instruct list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  void addForm(OperandForm *ptr);    // Add objects to the operand list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  void addForm(OpClassForm *ptr);    // Add objects to the opclasss list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  void addForm(AttributeForm *ptr);  // Add objects to the attributes list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  void addForm(RegisterForm *ptr);   // Add objects to the register list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  void addForm(FrameForm    *ptr);   // Add objects to the frame list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  void addForm(PipelineForm *ptr);   // Add objects to the pipeline list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  void addForm(MachNodeForm *ptr);   // Add objects to the machnode list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  int  operandFormCount();           // Count number of OperandForms defined
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  int  opclassFormCount();           // Count number of OpClassForms defined
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  int  instructFormCount();          // Count number of InstructForms defined
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  inline void getForm(EncodeForm **ptr)     { *ptr = _encode; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  bool verify();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
  // Helper utility that gets MatchList components from inside MatchRule
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  void check_optype(MatchRule *mrule);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
  void build_chain_rule(OperandForm *oper);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
  void add_chain_rule_entry(const char *src, const char *cost,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
                            const char *result);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  const char *getMatchListIndex(MatchRule &mrule);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  void generateMatchLists();         // Build MatchList array and populate it
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
  void inspectOperands();            // Build MatchLists for all operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  void inspectOpClasses();           // Build MatchLists for all operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
  void inspectInstructions();        // Build MatchLists for all operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  void buildDFA(FILE *fp);           // Driver for constructing the DFA
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
  void gen_dfa_state_body(FILE *fp, Dict &minmize, ProductionState &status, Dict &chained, int i);    // Driver for constructing the DFA state bodies
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
  // Helper utilities to generate reduction maps for internal operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
  const char *reduceLeft (char *internalName);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
  const char *reduceRight(char *internalName);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
  // Build enumerations, (1) dense operand index, (2) operands and opcodes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
  const char *machOperEnum(const char *opName);       // create dense index names using static function
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
  static const char *getMachOperEnum(const char *opName);// create dense index name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
  void buildMachOperEnum(FILE *fp_hpp);// dense enumeration for operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
  void buildMachOpcodesEnum(FILE *fp_hpp);// enumeration for MachOpers & MachNodes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
  // Helper utilities to generate Register Masks
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
  RegisterForm *get_registers() { return _register; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
  const char *reg_mask(OperandForm  &opForm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
  const char *reg_mask(InstructForm &instForm);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
  const char *reg_class_to_reg_mask(const char *reg_class);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  char *stack_or_reg_mask(OperandForm  &opForm);  // name of cisc_spillable version
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
  // This register class should also generate a stack_or_reg_mask
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
  void  set_stack_or_reg(const char *reg_class_name); // for cisc-spillable reg classes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
  // Generate an enumeration of register mask names and the RegMask objects.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
  void  declare_register_masks(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  void  build_register_masks(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
  // Generate enumeration of machine register numbers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
  void  buildMachRegisterNumbers(FILE *fp_hpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
  // Generate enumeration of machine register encodings
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
  void  buildMachRegisterEncodes(FILE *fp_hpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
  // Generate Regsiter Size Array
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
  void  declareRegSizes(FILE *fp_hpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
  // Generate Pipeline Class information
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  void declare_pipe_classes(FILE *fp_hpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
  // Generate Pipeline definitions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
  void build_pipeline_enums(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
  // Generate Pipeline Class information
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
  void build_pipe_classes(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
  // Declare and define mappings from rules to result and input types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
  void build_map(OutputMap &map);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
  void buildReduceMaps(FILE *fp_hpp, FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
  // build flags for signaling that our machine needs this instruction cloned
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
  void buildMustCloneMap(FILE *fp_hpp, FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
  // output SUN copyright info
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
  void addSunCopyright(char* legal, int size, FILE *fp);
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   285
  // output the start of an include guard.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   286
  void addIncludeGuardStart(ADLFILE &adlfile, const char* guardString);
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   287
  // output the end of an include guard.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   288
  void addIncludeGuardEnd(ADLFILE &adlfile, const char* guardString);
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   289
  // output the #include line for this file.
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   290
  void addInclude(ADLFILE &adlfile, const char* fileName);
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   291
  void addInclude(ADLFILE &adlfile, const char* includeDir, const char* fileName);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
  // Output C preprocessor code to verify the backend compilation environment.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
  void addPreprocessorChecks(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
  // Output C source and header (source_hpp) blocks.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
  void addPreHeaderBlocks(FILE *fp_hpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
  void addHeaderBlocks(FILE *fp_hpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
  void addSourceBlocks(FILE *fp_cpp);
22865
3b8857d7b3cc 8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms
goetz
parents: 22844
diff changeset
   298
  void generate_needs_clone_jvms(FILE *fp_cpp);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
  void generate_adlc_verification(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
  // output declaration of class State
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
  void defineStateClass(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
  // Generator for MachOper objects given integer type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
  void buildMachOperGenerator(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
  // Generator for MachNode objects given integer type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
  void buildMachNodeGenerator(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
  // Generator for Expand methods for instructions with expand rules
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   310
  void defineExpand      (FILE *fp, InstructForm *node);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
  // Generator for Peephole methods for instructions with peephole rules
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   312
  void definePeephole    (FILE *fp, InstructForm *node);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
  // Generator for Size methods for instructions
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   314
  void defineSize        (FILE *fp, InstructForm &node);
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   315
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   316
public:
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   317
  // Generator for EvalConstantValue methods for instructions
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   318
  void defineEvalConstant(FILE *fp, InstructForm &node);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
  // Generator for Emit methods for instructions
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   320
  void defineEmit        (FILE *fp, InstructForm &node);
22844
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 13971
diff changeset
   321
  // Generator for postalloc_expand methods for instructions.
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 13971
diff changeset
   322
  void define_postalloc_expand(FILE *fp, InstructForm &node);
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   323
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
  // Define a MachOper encode method
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  void define_oper_interface(FILE *fp, OperandForm &oper, FormDict &globals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
                             const char *name, const char *encoding);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
  // Methods to construct the MachNode class hierarchy
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
  // Return the type signature for the ideal operation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
  const char *getIdealType(const char *idealOp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
  // Declare and define the classes derived from MachOper and MachNode
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
  void declareClasses(FILE *fp_hpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
  void defineClasses(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
  // Emit an ADLC message
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
  void internal_err( const char *fmt, ...);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
  void syntax_err  ( int lineno, const char *fmt, ...);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
  int  emit_msg(int quiet, int flag, int linenum, const char *fmt,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
       va_list args);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
  // Generator for has_match_rule methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  void buildInstructMatchCheck(FILE *fp_cpp) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
  // Generator for Frame Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
  void buildFrameMethods(FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
  // Generate CISC_spilling oracle and MachNode::cisc_spill() methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
  void          build_cisc_spill_instructions(FILE *fp_hpp, FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
  void          identify_cisc_spill_instructions();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
  void          identify_short_branches();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
  void          identify_unique_operands();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
  void          set_cisc_spill_operand(OperandForm *opForm) { _cisc_spill_operand = opForm; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
  OperandForm  *cisc_spill_operand() { return _cisc_spill_operand; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
  bool          can_cisc_spill() { return _cisc_spill_operand != NULL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
  // build MatchList from MatchRule
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
  void buildMatchList(MatchRule *mrule, const char *resultStr,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
                      const char *rootOp, Predicate *pred, const char *cost);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
  void buildMList(MatchNode *node, const char *rootOp, const char *resultOp,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
                  Predicate *pred, const char *cost);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
  friend class ADLParser;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
// -------------------------------- maps ------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
// Base class for generating a mapping from rule number to value.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
// Used with ArchDesc::build_map() for all maps except "enum MachOperands"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
// A derived class defines the appropriate output for a specific mapping.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
class OutputMap {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
protected:
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 7433
diff changeset
   377
  FILE       *_hpp;
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 7433
diff changeset
   378
  FILE       *_cpp;
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 7433
diff changeset
   379
  FormDict   &_globals;
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 7433
diff changeset
   380
  ArchDesc   &_AD;
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 7433
diff changeset
   381
  const char *_name;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
public:
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 7433
diff changeset
   383
  OutputMap (FILE *decl_file, FILE *def_file, FormDict &globals, ArchDesc &AD, const char *name)
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 7433
diff changeset
   384
    : _hpp(decl_file), _cpp(def_file), _globals(globals), _AD(AD), _name(name) {};
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
  // Access files used by this routine
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
  FILE        *decl_file() { return _hpp; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
  FILE        *def_file()  { return _cpp; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
  // Positions in iteration that derived class will be told about
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
  enum position { BEGIN_OPERANDS,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
                  BEGIN_OPCLASSES,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
                  BEGIN_INTERNALS,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
                  BEGIN_INSTRUCTIONS,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
                  BEGIN_INST_CHAIN_RULES,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
                  END_INST_CHAIN_RULES,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
                  BEGIN_REMATERIALIZE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
                  END_REMATERIALIZE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
                  END_INSTRUCTIONS
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
  // Output routines specific to the derived class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
  virtual void declaration() {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
  virtual void definition()  {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
  virtual void closing()     {  fprintf(_cpp, "};\n"); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
  virtual void map(OperandForm  &oper) { }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
  virtual void map(OpClassForm  &opc)  { }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
  virtual void map(char         *internal_name) { }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
  // Allow enum-MachOperands to turn-off instructions
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
  virtual bool do_instructions()       { return true; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
  virtual void map(InstructForm &inst) { }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
  // Allow derived class to output name and position specific info
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
  virtual void record_position(OutputMap::position place, int index) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   412
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 47216
diff changeset
   413
#endif // SHARE_ADLC_ARCHDESC_HPP