src/hotspot/share/adlc/formssel.hpp
author ihse
Thu, 19 Oct 2017 11:59:52 +0200
changeset 47659 a8e9aff89f7b
parent 47216 71c04702a3d5
child 51566 904cf5407ac7
permissions -rw-r--r--
8189608: Remove duplicated jni.h Reviewed-by: erikj, dholmes, coleenp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
26910
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
     2
 * Copyright (c) 1998, 2014, 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: 5536
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5536
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: 5536
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
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_ADLC_FORMSSEL_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_ADLC_FORMSSEL_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
// FORMSSEL.HPP - ADL Parser Instruction Selection Forms Classes
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
// Class List
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
class Form;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
class InstructForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
class MachNodeForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
class OperandForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
class OpClassForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
class AttributeForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
class RegisterForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
class PipelineForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
class SourceForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
class EncodeForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
class Component;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
class Constraint;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
class Predicate;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
class MatchRule;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
class Attribute;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
class Effect;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
class ExpandRule;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
class RewriteRule;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
class ConstructRule;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
class FormatRule;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
class Peephole;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
class EncClass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
class Interface;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
class RegInterface;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
class ConstInterface;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
class MemInterface;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
class CondInterface;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
class Opcode;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
class InsEncode;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
class RegDef;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
class RegClass;
30202
6f5c48bd9b82 8075798: Allow ADLC register class to depend on runtime conditions also for cisc-spillable classes
zmajo
parents: 26910
diff changeset
    62
class CodeSnippetRegClass;
6f5c48bd9b82 8075798: Allow ADLC register class to depend on runtime conditions also for cisc-spillable classes
zmajo
parents: 26910
diff changeset
    63
class ConditionalRegClass;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
class AllocClass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
class ResourceForm;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
class PipeDesc;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
class PipeClass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
class PeepMatch;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
class PeepConstraint;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
class PeepReplace;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
class MatchList;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
class ArchDesc;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
//==============================Instructions===================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
//------------------------------InstructForm-----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
class InstructForm : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
private:
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
    79
  bool           _ideal_only;       // Not a user-defined instruction
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  // Members used for tracking CISC-spilling
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 13104
diff changeset
    81
  int            _cisc_spill_operand;// Which operand may cisc-spill
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  void           set_cisc_spill_operand(uint op_index) { _cisc_spill_operand = op_index; }
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
    83
  bool           _is_cisc_alternate;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
  InstructForm  *_cisc_spill_alternate;// cisc possible replacement
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  const char    *_cisc_reg_mask_name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  InstructForm  *_short_branch_form;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  bool           _is_short_branch;
22850
4e69ce7e1101 8028580: PPC64 (part 114/120): Support for Call nodes with constants.
goetz
parents: 22844
diff changeset
    88
  bool           _is_mach_constant;    // True if Node is a MachConstantNode.
4e69ce7e1101 8028580: PPC64 (part 114/120): Support for Call nodes with constants.
goetz
parents: 22844
diff changeset
    89
  bool           _needs_constant_base; // True if Node needs the mach_constant_base input.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  uint           _alignment;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  // Public Data
22844
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
    94
  const char    *_ident;               // Name of this instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
    95
  NameList       _parameters;          // Locally defined names
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
    96
  FormDict       _localNames;          // Table of operands & their types
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
    97
  MatchRule     *_matrule;             // Matching rule for this instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
    98
  Opcode        *_opcode;              // Encoding of the opcode for instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
    99
  char          *_size;                // Size of instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   100
  InsEncode     *_insencode;           // Encoding class instruction belongs to
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   101
  InsEncode     *_constant;            // Encoding class constant value belongs to
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   102
  bool           _is_postalloc_expand; // Indicates that encoding just does a lateExpand.
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   103
  Attribute     *_attribs;             // List of Attribute rules
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   104
  Predicate     *_predicate;           // Predicate test for this instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   105
  FormDict       _effects;             // Dictionary of effect rules
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   106
  ExpandRule    *_exprule;             // Expand rule for this instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   107
  RewriteRule   *_rewrule;             // Rewrite rule for this instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   108
  FormatRule    *_format;              // Format for assembly generation
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   109
  Peephole      *_peephole;            // List of peephole rules for instruction
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   110
  const char    *_ins_pipe;            // Instruction Scheduling description class
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
22844
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   112
  uint          *_uniq_idx;            // Indexes of unique operands
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   113
  uint           _uniq_idx_length;     // Length of _uniq_idx array
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   114
  uint           _num_uniq;            // Number  of unique operands
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   115
  ComponentList  _components;          // List of Components matches MachNode's
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   116
                                       // operand structure
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
22844
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   118
  bool           _has_call;            // contain a call and caller save registers should be saved?
11196
a310a659c580 7077312: Provide a CALL effect for instruct declaration in the ad file
roland
parents: 10255
diff changeset
   119
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  InstructForm(const char *id, bool ideal_only = false);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  InstructForm(const char *id, InstructForm *instr, MatchRule *rule);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  ~InstructForm();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  // Dynamic type check
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  virtual InstructForm *is_instruction() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  virtual bool        ideal_only() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  // This instruction sets a result
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  virtual bool        sets_result() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  // This instruction needs projections for additional DEFs or KILLs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  virtual bool        needs_projections();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  // This instruction needs extra nodes for temporary inputs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  virtual bool        has_temps();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  // This instruction defines or kills more than one object
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  virtual uint        num_defs_or_kills();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  // This instruction has an expand rule?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  virtual bool        expands() const ;
22844
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   140
  // This instruction has a late expand rule?
90f76a40ed8a 8003854: PPC64 (part 115): Introduce PostallocExpand that expands nodes after register allocation
goetz
parents: 20289
diff changeset
   141
  virtual bool        postalloc_expands() const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  // Return this instruction's first peephole rule, or NULL
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  virtual Peephole   *peepholes() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  // Add a peephole rule to this instruction
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  virtual void        append_peephole(Peephole *peep);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  virtual bool        is_pinned(FormDict &globals); // should be pinned inside block
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  virtual bool        is_projection(FormDict &globals); // node requires projection
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  virtual bool        is_parm(FormDict &globals); // node matches ideal 'Parm'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  // ideal opcode enumeration
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  virtual const char *ideal_Opcode(FormDict &globals)  const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  virtual int         is_expensive() const;     // node matches ideal 'CosD'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  virtual int         is_empty_encoding() const; // _size=0 and/or _insencode empty
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  virtual int         is_tls_instruction() const; // tlsLoadP rule or ideal ThreadLocal
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  virtual int         is_ideal_copy() const;    // node matches ideal 'Copy*'
18102
5c2c46c821ba 8016157: During CTW: C2: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block
adlertz
parents: 17871
diff changeset
   156
  virtual bool        is_ideal_negD() const;    // node matches ideal 'NegD'
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  virtual bool        is_ideal_if()   const;    // node matches ideal 'If'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  virtual bool        is_ideal_fastlock() const; // node matches 'FastLock'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  virtual bool        is_ideal_membar() const;  // node matches ideal 'MemBarXXX'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  virtual bool        is_ideal_loadPC() const;  // node matches ideal 'LoadPC'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  virtual bool        is_ideal_box() const;     // node matches ideal 'Box'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  virtual bool        is_ideal_goto() const;    // node matches ideal 'Goto'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  virtual bool        is_ideal_branch() const;  // "" 'If' | 'Goto' | 'LoopEnd' | 'Jump'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  virtual bool        is_ideal_jump() const;    // node matches ideal 'Jump'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  virtual bool        is_ideal_return() const;  // node matches ideal 'Return'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  virtual bool        is_ideal_halt() const;    // node matches ideal 'Halt'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  virtual bool        is_ideal_safepoint() const; // node matches 'SafePoint'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  virtual bool        is_ideal_nop() const;     // node matches 'Nop'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  virtual bool        is_ideal_control() const; // control node
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 11196
diff changeset
   170
  virtual bool        is_vector() const;        // vector instruction
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  virtual Form::CallType is_ideal_call() const; // matches ideal 'Call'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  virtual Form::DataType is_ideal_load() const; // node matches ideal 'LoadXNode'
3272
5a1e113bfed5 6857159: local schedule failed with checkcast of Thread.currentThread()
never
parents: 2131
diff changeset
   174
  // Should antidep checks be disabled for this Instruct
5a1e113bfed5 6857159: local schedule failed with checkcast of Thread.currentThread()
never
parents: 2131
diff changeset
   175
  // See definition of MatchRule::skip_antidep_check
5a1e113bfed5 6857159: local schedule failed with checkcast of Thread.currentThread()
never
parents: 2131
diff changeset
   176
  bool skip_antidep_check() const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  virtual Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
          bool        is_ideal_mem() const { return is_ideal_load() != Form::none || is_ideal_store() != Form::none; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
  virtual uint        two_address(FormDict &globals); // output reg must match input reg
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  // when chaining a constant to an instruction, return 'true' and set opType
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  virtual Form::DataType is_chain_of_constant(FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
  virtual Form::DataType is_chain_of_constant(FormDict &globals, const char * &opType);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  virtual Form::DataType is_chain_of_constant(FormDict &globals, const char * &opType, const char * &result_type);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  // Check if a simple chain rule
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  virtual bool        is_simple_chain_rule(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  // check for structural rematerialization
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  virtual bool        rematerialize(FormDict &globals, RegisterForm *registers);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
  // loads from memory, so must check for anti-dependence
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  virtual bool        needs_anti_dependence_check(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  virtual int         memory_operand(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
          bool        is_wide_memory_kill(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  enum memory_operand_type {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
    NO_MEMORY_OPERAND = -1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
    MANY_MEMORY_OPERANDS = 999999
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  // This instruction captures the machine-independent bottom_type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  // Expected use is for pointer vs oop determination for LoadP
5536
f23c4e2e0d5e 6953576: bottom_type for matched AddPNodes doesn't always agree with ideal
never
parents: 3272
diff changeset
   204
  virtual bool        captures_bottom_type(FormDict& globals) const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  virtual const char *cost();      // Access ins_cost attribute
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  virtual uint        num_opnds(); // Count of num_opnds for MachNode class
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 13104
diff changeset
   208
                                   // Counts USE_DEF opnds twice.  See also num_unique_opnds().
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  virtual uint        num_post_match_opnds();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  virtual uint        num_consts(FormDict &globals) const;// Constants in match rule
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  // Constants in match rule with specified type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  virtual uint        num_consts(FormDict &globals, Form::DataType type) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  // Return the register class associated with 'leaf'.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  virtual const char *out_reg_class(FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  // number of ideal node inputs to skip
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  virtual uint        oper_input_base(FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  // Does this instruction need a base-oop edge?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  int needs_base_oop_edge(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  // Build instruction predicates.  If the user uses the same operand name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  // twice, we need to check that the operands are pointer-eequivalent in
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  // the DFA during the labeling process.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
  Predicate *build_predicate();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  virtual void        build_components(); // top-level operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
  // Return zero-based position in component list; -1 if not in list.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
  virtual int         operand_position(const char *name, int usedef);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  virtual int         operand_position_format(const char *name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
  // Return zero-based position in component list; -1 if not in list.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
  virtual int         label_position();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  virtual int         method_position();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  // Return number of relocation entries needed for this instruction.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
  virtual uint        reloc(FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 13104
diff changeset
   239
  const char         *opnd_ident(int idx);  // Name of operand #idx.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  const char         *reduce_result();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
  // Return the name of the operand on the right hand side of the binary match
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
  // Return NULL if there is no right hand side
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
  const char         *reduce_right(FormDict &globals)  const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
  const char         *reduce_left(FormDict &globals)   const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
  // Base class for this instruction, MachNode except for calls
5536
f23c4e2e0d5e 6953576: bottom_type for matched AddPNodes doesn't always agree with ideal
never
parents: 3272
diff changeset
   247
  virtual const char *mach_base_class(FormDict &globals)  const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
  // Check if this instruction can cisc-spill to 'alternate'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
  bool                cisc_spills_to(ArchDesc &AD, InstructForm *alternate);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
  InstructForm       *cisc_spill_alternate() { return _cisc_spill_alternate; }
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 13104
diff changeset
   252
  int                 cisc_spill_operand() const { return _cisc_spill_operand; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
  bool                is_cisc_alternate() const { return _is_cisc_alternate; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
  void                set_cisc_alternate(bool val) { _is_cisc_alternate = val; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
  const char         *cisc_reg_mask_name() const { return _cisc_reg_mask_name; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
  void                set_cisc_reg_mask_name(const char *rm_name) { _cisc_reg_mask_name = rm_name; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
  // Output cisc-method prototypes and method bodies
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  void                declare_cisc_version(ArchDesc &AD, FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
  bool                define_cisc_version (ArchDesc &AD, FILE *fp_cpp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
  bool                check_branch_variant(ArchDesc &AD, InstructForm *short_branch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  bool                is_short_branch() { return _is_short_branch; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
  void                set_short_branch(bool val) { _is_short_branch = val; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   266
  bool                    is_mach_constant() const { return _is_mach_constant;     }
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   267
  void                set_is_mach_constant(bool x) {        _is_mach_constant = x; }
22850
4e69ce7e1101 8028580: PPC64 (part 114/120): Support for Call nodes with constants.
goetz
parents: 22844
diff changeset
   268
  bool                    needs_constant_base() const { return _needs_constant_base;     }
4e69ce7e1101 8028580: PPC64 (part 114/120): Support for Call nodes with constants.
goetz
parents: 22844
diff changeset
   269
  void                set_needs_constant_base(bool x) {        _needs_constant_base = x; }
7433
b418028612ad 6961690: load oops from constant table on SPARC
twisti
parents: 7397
diff changeset
   270
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  InstructForm       *short_branch_form() { return _short_branch_form; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
  bool                has_short_branch_form() { return _short_branch_form != NULL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
  // Output short branch prototypes and method bodies
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
  void                declare_short_branch_methods(FILE *fp_cpp);
5536
f23c4e2e0d5e 6953576: bottom_type for matched AddPNodes doesn't always agree with ideal
never
parents: 3272
diff changeset
   275
  bool                define_short_branch_methods(ArchDesc &AD, FILE *fp_cpp);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
  uint                alignment() { return _alignment; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
  void                set_alignment(uint val) { _alignment = val; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
  // Seach through operands to determine operands unique positions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
  void                set_unique_opnds();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
  uint                num_unique_opnds() { return _num_uniq; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
  uint                unique_opnds_idx(int idx) {
17871
6669c8d6f6b3 8015266: fix some -Wsign-compare warnings in adlc
twisti
parents: 13971
diff changeset
   284
    if (_uniq_idx != NULL && idx > 0) {
6669c8d6f6b3 8015266: fix some -Wsign-compare warnings in adlc
twisti
parents: 13971
diff changeset
   285
      assert((uint)idx < _uniq_idx_length, "out of bounds");
6669c8d6f6b3 8015266: fix some -Wsign-compare warnings in adlc
twisti
parents: 13971
diff changeset
   286
      return _uniq_idx[idx];
6669c8d6f6b3 8015266: fix some -Wsign-compare warnings in adlc
twisti
parents: 13971
diff changeset
   287
    } else {
6669c8d6f6b3 8015266: fix some -Wsign-compare warnings in adlc
twisti
parents: 13971
diff changeset
   288
      return idx;
6669c8d6f6b3 8015266: fix some -Wsign-compare warnings in adlc
twisti
parents: 13971
diff changeset
   289
    }
2125
592f115cc6b4 6805427: adlc compiler may generate incorrect machnode emission code
never
parents: 1623
diff changeset
   290
  }
17871
6669c8d6f6b3 8015266: fix some -Wsign-compare warnings in adlc
twisti
parents: 13971
diff changeset
   291
  const char         *unique_opnd_ident(uint idx);  // Name of operand at unique idx.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
  // Operands which are only KILLs aren't part of the input array and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
  // require special handling in some cases.  Their position in this
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
  // operand list is higher than the number of unique operands.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
  bool is_noninput_operand(uint idx) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
    return (idx >= num_unique_opnds());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
  // --------------------------- FILE *output_routines
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
  // Generate the format call for the replacement variable
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
  void                rep_var_format(FILE *fp, const char *rep_var);
2131
98f9cef66a34 6810672: Comment typos
twisti
parents: 2129
diff changeset
   304
  // Generate index values needed for determining the operand position
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
  void                index_temps   (FILE *fp, FormDict &globals, const char *prefix = "", const char *receiver = "");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
  // ---------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
  virtual bool verify();           // Check consistency after parsing
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
  virtual void dump();             // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
  virtual void output(FILE *fp);   // Write to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
//------------------------------EncodeForm-------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
class EncodeForm : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
  NameList  _eclasses;            // List of encode class names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
  Dict      _encClass;            // Map encode class names to EncClass objects
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
  EncodeForm();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  ~EncodeForm();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
  EncClass   *add_EncClass(const char *className);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
  EncClass   *encClass(const char *className);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
  const char *encClassPrototype(const char *className);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
  const char *encClassBody(const char *className);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
  void dump();                     // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
  void output(FILE *fp);           // Write info to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
//------------------------------EncClass---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
class EncClass : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
  // NameList for parameter type and name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
  NameList       _parameter_type;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  NameList       _parameter_name;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
  // Breakdown the encoding into strings separated by $replacement_variables
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
  // There is an entry in _strings, perhaps NULL, that precedes each _rep_vars
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
  NameList       _code;            // Strings passed through to tty->print
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
  NameList       _rep_vars;        // replacement variables
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
  NameList       _parameters;      // Locally defined names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
  FormDict       _localNames;      // Table of components & their types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
  const char    *_name;            // encoding class name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
  EncClass(const char *name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
  ~EncClass();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
  // --------------------------- Parameters
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
  // Add a parameter <type,name> pair
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
  void add_parameter(const char *parameter_type, const char *parameter_name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
  // Verify operand types in parameter list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
  bool check_parameter_types(FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
  // Obtain the zero-based index corresponding to a replacement variable
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
  int         rep_var_index(const char *rep_var);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
  int         num_args() { return _parameter_name.count(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
  // --------------------------- Code Block
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
  // Add code
2131
98f9cef66a34 6810672: Comment typos
twisti
parents: 2129
diff changeset
   371
  void add_code(const char *string_preceding_replacement_var);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
  // Add a replacement variable or one of its subfields
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
  // Subfields are stored with a leading '$'
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
  void add_rep_var(char *replacement_var);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
  bool verify();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
//------------------------------MachNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
class MachNodeForm: public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
  char          *_ident;           // Name of this instruction
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
  const char    *_machnode_pipe;   // Instruction Scheduline description class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
  MachNodeForm(char *id);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
  ~MachNodeForm();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
  virtual MachNodeForm *is_machnode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
  void dump();                     // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
  void output(FILE *fp);           // Write info to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
//------------------------------Opcode-----------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
class Opcode : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
  // Strings representing instruction opcodes, user defines placement in emit
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
  char *_primary;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
  char *_secondary;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
  char *_tertiary;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
  enum opcode_type {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
    NOT_AN_OPCODE = -1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
    PRIMARY   = 1,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
    SECONDARY = 2,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
    TERTIARY  = 3
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
  Opcode(char *primary, char *secondary, char *tertiary);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
  ~Opcode();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
  static Opcode::opcode_type as_opcode_type(const char *designator);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
  // --------------------------- FILE *output_routines
1495
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   427
  bool print_opcode(FILE *fp, Opcode::opcode_type desired_opcode);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
//------------------------------InsEncode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
class InsEncode : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
  // Public Data (access directly only for reads)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
  // The encodings can only have the values predefined by the ADLC:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
  // blank, RegReg, RegMem, MemReg, ...
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
  NameList    _encoding;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
  // NameList    _parameter;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
  // The parameters for each encoding are preceeded by a NameList::_signal
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
  // and follow the parameters for the previous encoding.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
  // char *_encode;                  // Type of instruction encoding
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
  InsEncode();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
  ~InsEncode();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
  // Add "encode class name" and its parameters
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
  NameAndList  *add_encode(char *encode_method_name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
  // Parameters are added to the returned "NameAndList" by the parser
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
  // Access the list of encodings
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
  void          reset();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
  const char   *encode_class_iter();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
  // Returns the number of arguments to the current encoding in the iteration
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
  int current_encoding_num_args() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
    return ((NameAndList*)_encoding.current())->count();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
  // --------------------------- Parameters
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
  // The following call depends upon position within encode_class_iteration
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
  // Obtain parameter name from zero based index
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
  const char   *rep_var_name(InstructForm &inst, uint param_no);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
  // ---------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
//------------------------------Effect-----------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
class Effect : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
  const char  *_name;            // Pre-defined name for effect
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
  int         _use_def;          // Enumeration value of effect
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
  Effect(const char *name);      // Constructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
  ~Effect();                     // Destructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
  // Dynamic type check
489c9b5090e2 Initial load
duke
parents:
diff changeset
   486
  virtual Effect *is_effect() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   487
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
  // Return 'true' if this use def info equals the parameter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
  bool  is(int use_def_kill_enum) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
  // Return 'true' if this use def info is a superset of parameter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
  bool  isa(int use_def_kill_enum) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
  void dump();                   // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   494
  void output(FILE *fp);         // Write info to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
//------------------------------ExpandRule-------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
class ExpandRule : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   499
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
  NameList _expand_instrs;        // ordered list of instructions and operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
  NameList _newopers;             // List of newly created operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
  Dict     _newopconst;           // Map new operands to their constructors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
  void     add_instruction(NameAndList *instruction_name_and_operand_list);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
  void     reset_instructions();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
  NameAndList *iter_instructions();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
  ExpandRule();                   // Constructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
  ~ExpandRule();                  // Destructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
  void dump();                    // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
  void output(FILE *fp);          // Write info to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   517
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
//------------------------------RewriteRule------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
class RewriteRule : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
  SourceForm     *_condition;      // Rewrite condition code
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
  InstructForm   *_instrs;         // List of instructions to expand to
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
  OperandForm    *_opers;          // List of operands generated by expand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
  char           *_tempParams;     // Hold string until parser is finished.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
  char           *_tempBlock;      // Hold string until parser is finished.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
  RewriteRule(char* params, char* block) ;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
  ~RewriteRule();                  // Destructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
  void dump();                     // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
  void output(FILE *fp);           // Write info to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   536
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
//==============================Operands=======================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
//------------------------------OpClassForm------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
class OpClassForm : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   544
  const char    *_ident;           // Name of this operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   545
  NameList       _oplst;           // List of operand forms included in class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
  OpClassForm(const char *id);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
  ~OpClassForm();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   550
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
  // dynamic type check
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
  virtual OpClassForm         *is_opclass() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
  virtual Form::InterfaceType  interface_type(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
  virtual bool                 stack_slots_only(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
  virtual bool                 is_cisc_mem(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
  // Min and Max opcodes of operands in this operand class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
  int _minCode;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   561
  int _maxCode;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   562
489c9b5090e2 Initial load
duke
parents:
diff changeset
   563
  virtual bool ideal_only() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
  virtual void dump();             // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
  virtual void output(FILE *fp);   // Write to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   567
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
//------------------------------OperandForm------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   569
class OperandForm : public OpClassForm {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   570
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   571
  bool         _ideal_only; // Not a user-defined instruction
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
489c9b5090e2 Initial load
duke
parents:
diff changeset
   573
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
  NameList       _parameters; // Locally defined names
489c9b5090e2 Initial load
duke
parents:
diff changeset
   576
  FormDict       _localNames; // Table of components & their types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   577
  MatchRule     *_matrule;    // Matching rule for this operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   578
  Interface     *_interface;  // Encoding interface for this operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   579
  Attribute     *_attribs;    // List of Attribute rules
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
  Predicate     *_predicate;  // Predicate test for this operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   581
  Constraint    *_constraint; // Constraint Rule for this operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
  ConstructRule *_construct;  // Construction of operand data after matching
489c9b5090e2 Initial load
duke
parents:
diff changeset
   583
  FormatRule    *_format;     // Format for assembly generation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
  NameList       _classes;    // List of opclasses which contain this oper
489c9b5090e2 Initial load
duke
parents:
diff changeset
   585
489c9b5090e2 Initial load
duke
parents:
diff changeset
   586
  ComponentList _components;  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   589
  OperandForm(const char *id);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
  OperandForm(const char *id, bool ideal_only);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   591
  ~OperandForm();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
489c9b5090e2 Initial load
duke
parents:
diff changeset
   593
  // Dynamic type check
489c9b5090e2 Initial load
duke
parents:
diff changeset
   594
  virtual OperandForm *is_operand() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
  virtual bool        ideal_only() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
  virtual Form::InterfaceType interface_type(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
  virtual bool                 stack_slots_only(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   599
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
  virtual const char *cost();  // Access ins_cost attribute
489c9b5090e2 Initial load
duke
parents:
diff changeset
   601
  virtual uint        num_leaves() const;// Leaves in complex operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   602
  // Constants in operands' match rules
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
  virtual uint        num_consts(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   604
  // Constants in operand's match rule with specified type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
  virtual uint        num_consts(FormDict &globals, Form::DataType type) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   606
  // Pointer Constants in operands' match rules
489c9b5090e2 Initial load
duke
parents:
diff changeset
   607
  virtual uint        num_const_ptrs(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
  // The number of input edges in the machine world == num_leaves - num_consts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   609
  virtual uint        num_edges(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
  // Check if this operand is usable for cisc-spilling
489c9b5090e2 Initial load
duke
parents:
diff changeset
   612
  virtual bool        is_cisc_reg(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
489c9b5090e2 Initial load
duke
parents:
diff changeset
   614
  // node matches ideal 'Bool', grab condition codes from the ideal world
489c9b5090e2 Initial load
duke
parents:
diff changeset
   615
  virtual bool        is_ideal_bool()  const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   616
489c9b5090e2 Initial load
duke
parents:
diff changeset
   617
  // Has an integer constant suitable for spill offsets
489c9b5090e2 Initial load
duke
parents:
diff changeset
   618
  bool has_conI(FormDict &globals) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   619
    return (num_consts(globals,idealI) == 1) && !is_ideal_bool(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   620
  bool has_conL(FormDict &globals) const {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   621
    return (num_consts(globals,idealL) == 1) && !is_ideal_bool(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   622
489c9b5090e2 Initial load
duke
parents:
diff changeset
   623
  // Node is user-defined operand for an sRegX
489c9b5090e2 Initial load
duke
parents:
diff changeset
   624
  virtual Form::DataType is_user_name_for_sReg() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   625
489c9b5090e2 Initial load
duke
parents:
diff changeset
   626
  // Return ideal type, if there is a single ideal type for this operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   627
  virtual const char *ideal_type(FormDict &globals, RegisterForm *registers = NULL) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   628
  // If there is a single ideal type for this interface field, return it.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   629
  virtual const char *interface_ideal_type(FormDict   &globals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   630
                                           const char *field_name) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   631
489c9b5090e2 Initial load
duke
parents:
diff changeset
   632
  // Return true if this operand represents a bound register class
489c9b5090e2 Initial load
duke
parents:
diff changeset
   633
  bool is_bound_register() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   634
489c9b5090e2 Initial load
duke
parents:
diff changeset
   635
  // Return the Register class for this operand.  Returns NULL if
489c9b5090e2 Initial load
duke
parents:
diff changeset
   636
  // operand isn't a register form.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   637
  RegClass* get_RegClass() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   638
489c9b5090e2 Initial load
duke
parents:
diff changeset
   639
  virtual       bool  is_interface_field(const char   *field_name,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   640
                                         const char   * &value) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   641
489c9b5090e2 Initial load
duke
parents:
diff changeset
   642
  // If this operand has a single ideal type, return its type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   643
  virtual Form::DataType simple_type(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   644
  // If this operand is an ideal constant, return its type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   645
  virtual Form::DataType is_base_constant(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   646
489c9b5090e2 Initial load
duke
parents:
diff changeset
   647
  // "true" if this operand is a simple type that is swallowed
489c9b5090e2 Initial load
duke
parents:
diff changeset
   648
  virtual bool        swallowed(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   649
489c9b5090e2 Initial load
duke
parents:
diff changeset
   650
  // Return register class name if a constraint specifies the register class.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   651
  virtual const char *constrained_reg_class() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   652
  // Return the register class associated with 'leaf'.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   653
  virtual const char *in_reg_class(uint leaf, FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   654
489c9b5090e2 Initial load
duke
parents:
diff changeset
   655
  // Build component list from MatchRule and operand's parameter list
489c9b5090e2 Initial load
duke
parents:
diff changeset
   656
  virtual void        build_components(); // top-level operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   657
489c9b5090e2 Initial load
duke
parents:
diff changeset
   658
  // Return zero-based position in component list; -1 if not in list.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   659
  virtual int         operand_position(const char *name, int usedef);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   660
489c9b5090e2 Initial load
duke
parents:
diff changeset
   661
  // Return zero-based position in component list; -1 if not in list.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   662
  virtual int         constant_position(FormDict &globals, const Component *comp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   663
  virtual int         constant_position(FormDict &globals, const char *local_name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   664
  // Return the operand form corresponding to the given index, else NULL.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   665
  virtual OperandForm *constant_operand(FormDict &globals, uint const_index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   666
489c9b5090e2 Initial load
duke
parents:
diff changeset
   667
  // Return zero-based position in component list; -1 if not in list.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   668
  virtual int         register_position(FormDict &globals, const char *regname);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   669
489c9b5090e2 Initial load
duke
parents:
diff changeset
   670
  const char         *reduce_result() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   671
  // Return the name of the operand on the right hand side of the binary match
489c9b5090e2 Initial load
duke
parents:
diff changeset
   672
  // Return NULL if there is no right hand side
489c9b5090e2 Initial load
duke
parents:
diff changeset
   673
  const char         *reduce_right(FormDict &globals)  const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   674
  const char         *reduce_left(FormDict &globals)   const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   675
489c9b5090e2 Initial load
duke
parents:
diff changeset
   676
489c9b5090e2 Initial load
duke
parents:
diff changeset
   677
  // --------------------------- FILE *output_routines
489c9b5090e2 Initial load
duke
parents:
diff changeset
   678
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   679
  // Output code for disp_is_oop, if true.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   680
  void                disp_is_oop(FILE *fp, FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   681
  // Generate code for internal and external format methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   682
  void                int_format(FILE *fp, FormDict &globals, uint index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   683
  void                ext_format(FILE *fp, FormDict &globals, uint index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   684
  void                format_constant(FILE *fp, uint con_index, uint con_type);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   685
  // Output code to access the value of the index'th constant
489c9b5090e2 Initial load
duke
parents:
diff changeset
   686
  void                access_constant(FILE *fp, FormDict &globals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   687
                                      uint con_index);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   688
  // ---------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   689
489c9b5090e2 Initial load
duke
parents:
diff changeset
   690
489c9b5090e2 Initial load
duke
parents:
diff changeset
   691
  virtual void dump();             // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   692
  virtual void output(FILE *fp);   // Write to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   694
489c9b5090e2 Initial load
duke
parents:
diff changeset
   695
//------------------------------Constraint-------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   696
class Constraint : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   697
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   698
489c9b5090e2 Initial load
duke
parents:
diff changeset
   699
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   700
  const char      *_func;          // Constraint function
489c9b5090e2 Initial load
duke
parents:
diff changeset
   701
  const char      *_arg;           // function's argument
489c9b5090e2 Initial load
duke
parents:
diff changeset
   702
489c9b5090e2 Initial load
duke
parents:
diff changeset
   703
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   704
  Constraint(const char *func, const char *arg); // Constructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   705
  ~Constraint();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
  bool stack_slots_only() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   708
489c9b5090e2 Initial load
duke
parents:
diff changeset
   709
  void dump();                     // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   710
  void output(FILE *fp);           // Write info to output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   711
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   712
489c9b5090e2 Initial load
duke
parents:
diff changeset
   713
//------------------------------Predicate--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   714
class Predicate : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   715
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   716
489c9b5090e2 Initial load
duke
parents:
diff changeset
   717
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   718
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   719
  char *_pred;                     // C++ source string for predicate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   720
489c9b5090e2 Initial load
duke
parents:
diff changeset
   721
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   722
  Predicate(char *pr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   723
  ~Predicate();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   724
489c9b5090e2 Initial load
duke
parents:
diff changeset
   725
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   726
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   727
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   728
489c9b5090e2 Initial load
duke
parents:
diff changeset
   729
//------------------------------Interface--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   730
class Interface : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   731
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   732
489c9b5090e2 Initial load
duke
parents:
diff changeset
   733
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   734
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   735
  const char *_name;               // String representing the interface name
489c9b5090e2 Initial load
duke
parents:
diff changeset
   736
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   738
  Interface(const char *name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   739
  ~Interface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   740
489c9b5090e2 Initial load
duke
parents:
diff changeset
   741
  virtual Form::InterfaceType interface_type(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   742
489c9b5090e2 Initial load
duke
parents:
diff changeset
   743
  RegInterface   *is_RegInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   744
  MemInterface   *is_MemInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   745
  ConstInterface *is_ConstInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   746
  CondInterface  *is_CondInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   747
489c9b5090e2 Initial load
duke
parents:
diff changeset
   748
489c9b5090e2 Initial load
duke
parents:
diff changeset
   749
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   750
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   751
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   752
489c9b5090e2 Initial load
duke
parents:
diff changeset
   753
//------------------------------RegInterface-----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   754
class RegInterface : public Interface {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   755
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   756
489c9b5090e2 Initial load
duke
parents:
diff changeset
   757
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   758
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   759
  RegInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   760
  ~RegInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   761
489c9b5090e2 Initial load
duke
parents:
diff changeset
   762
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   763
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   764
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   765
489c9b5090e2 Initial load
duke
parents:
diff changeset
   766
//------------------------------ConstInterface---------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   767
class ConstInterface : public Interface {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   768
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   769
489c9b5090e2 Initial load
duke
parents:
diff changeset
   770
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   771
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   772
  ConstInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   773
  ~ConstInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   774
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   776
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   777
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   778
489c9b5090e2 Initial load
duke
parents:
diff changeset
   779
//------------------------------MemInterface-----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   780
class MemInterface : public Interface {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   782
489c9b5090e2 Initial load
duke
parents:
diff changeset
   783
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   784
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   785
  char *_base;                     // Base address
489c9b5090e2 Initial load
duke
parents:
diff changeset
   786
  char *_index;                    // index
489c9b5090e2 Initial load
duke
parents:
diff changeset
   787
  char *_scale;                    // scaling factor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   788
  char *_disp;                     // displacement
489c9b5090e2 Initial load
duke
parents:
diff changeset
   789
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
  MemInterface(char *base, char *index, char *scale, char *disp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   792
  ~MemInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   793
489c9b5090e2 Initial load
duke
parents:
diff changeset
   794
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   795
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   796
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   797
489c9b5090e2 Initial load
duke
parents:
diff changeset
   798
//------------------------------CondInterface----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   799
class CondInterface : public Interface {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   800
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   801
489c9b5090e2 Initial load
duke
parents:
diff changeset
   802
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   803
  const char *_equal;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   804
  const char *_not_equal;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   805
  const char *_less;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   806
  const char *_greater_equal;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   807
  const char *_less_equal;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   808
  const char *_greater;
20289
35d78de0c547 8024924: Intrinsify java.lang.Math.addExact
rbackman
parents: 18102
diff changeset
   809
  const char *_overflow;
35d78de0c547 8024924: Intrinsify java.lang.Math.addExact
rbackman
parents: 18102
diff changeset
   810
  const char *_no_overflow;
1495
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   811
  const char *_equal_format;
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   812
  const char *_not_equal_format;
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   813
  const char *_less_format;
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   814
  const char *_greater_equal_format;
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   815
  const char *_less_equal_format;
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   816
  const char *_greater_format;
20289
35d78de0c547 8024924: Intrinsify java.lang.Math.addExact
rbackman
parents: 18102
diff changeset
   817
  const char *_overflow_format;
35d78de0c547 8024924: Intrinsify java.lang.Math.addExact
rbackman
parents: 18102
diff changeset
   818
  const char *_no_overflow_format;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   819
489c9b5090e2 Initial load
duke
parents:
diff changeset
   820
  // Public Methods
1495
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   821
  CondInterface(const char* equal,         const char* equal_format,
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   822
                const char* not_equal,     const char* not_equal_format,
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   823
                const char* less,          const char* less_format,
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   824
                const char* greater_equal, const char* greater_equal_format,
128fe18951ed 6754519: don't emit flag fixup for NaN when condition being tested doesn't need it
never
parents: 1
diff changeset
   825
                const char* less_equal,    const char* less_equal_format,
20289
35d78de0c547 8024924: Intrinsify java.lang.Math.addExact
rbackman
parents: 18102
diff changeset
   826
                const char* greater,       const char* greater_format,
35d78de0c547 8024924: Intrinsify java.lang.Math.addExact
rbackman
parents: 18102
diff changeset
   827
                const char* overflow,      const char* overflow_format,
35d78de0c547 8024924: Intrinsify java.lang.Math.addExact
rbackman
parents: 18102
diff changeset
   828
                const char* no_overflow,   const char* no_overflow_format);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   829
  ~CondInterface();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   830
489c9b5090e2 Initial load
duke
parents:
diff changeset
   831
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   832
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   833
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   834
489c9b5090e2 Initial load
duke
parents:
diff changeset
   835
//------------------------------ConstructRule----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   836
class ConstructRule : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   837
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   838
489c9b5090e2 Initial load
duke
parents:
diff changeset
   839
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   840
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   841
  char *_expr;                     // String representing the match expression
489c9b5090e2 Initial load
duke
parents:
diff changeset
   842
  char *_construct;                // String representing C++ constructor code
489c9b5090e2 Initial load
duke
parents:
diff changeset
   843
489c9b5090e2 Initial load
duke
parents:
diff changeset
   844
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   845
  ConstructRule(char *cnstr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   846
  ~ConstructRule();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   847
489c9b5090e2 Initial load
duke
parents:
diff changeset
   848
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   849
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   850
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   851
489c9b5090e2 Initial load
duke
parents:
diff changeset
   852
489c9b5090e2 Initial load
duke
parents:
diff changeset
   853
//==============================Shared=========================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   854
//------------------------------AttributeForm----------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   855
class AttributeForm : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   856
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   857
  // counters for unique instruction or operand ID
489c9b5090e2 Initial load
duke
parents:
diff changeset
   858
  static int   _insId;             // user-defined machine instruction types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   859
  static int   _opId;              // user-defined operand types
489c9b5090e2 Initial load
duke
parents:
diff changeset
   860
489c9b5090e2 Initial load
duke
parents:
diff changeset
   861
  int  id;                         // hold type for this object
489c9b5090e2 Initial load
duke
parents:
diff changeset
   862
489c9b5090e2 Initial load
duke
parents:
diff changeset
   863
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   864
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   865
  char *_attrname;                 // Name of attribute
489c9b5090e2 Initial load
duke
parents:
diff changeset
   866
  int   _atype;                    // Either INS_ATTR or OP_ATTR
489c9b5090e2 Initial load
duke
parents:
diff changeset
   867
  char *_attrdef;                  // C++ source which evaluates to constant
489c9b5090e2 Initial load
duke
parents:
diff changeset
   868
489c9b5090e2 Initial load
duke
parents:
diff changeset
   869
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   870
  AttributeForm(char *attr, int type, char *attrdef);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   871
  ~AttributeForm();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   872
489c9b5090e2 Initial load
duke
parents:
diff changeset
   873
  // Dynamic type check
489c9b5090e2 Initial load
duke
parents:
diff changeset
   874
  virtual AttributeForm *is_attribute() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   875
489c9b5090e2 Initial load
duke
parents:
diff changeset
   876
  int  type() { return id;}        // return this object's "id"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   877
489c9b5090e2 Initial load
duke
parents:
diff changeset
   878
  static const char* _ins_cost;        // "ins_cost"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   879
  static const char* _op_cost;         // "op_cost"
489c9b5090e2 Initial load
duke
parents:
diff changeset
   880
489c9b5090e2 Initial load
duke
parents:
diff changeset
   881
  void dump();                     // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   882
  void output(FILE *fp);           // Write output files
489c9b5090e2 Initial load
duke
parents:
diff changeset
   883
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   884
489c9b5090e2 Initial load
duke
parents:
diff changeset
   885
//------------------------------Component--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   886
class Component : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   887
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   888
489c9b5090e2 Initial load
duke
parents:
diff changeset
   889
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   890
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   891
  const char *_name;              // Name of this component
489c9b5090e2 Initial load
duke
parents:
diff changeset
   892
  const char *_type;              // Type of this component
489c9b5090e2 Initial load
duke
parents:
diff changeset
   893
  int         _usedef;            // Value of component
489c9b5090e2 Initial load
duke
parents:
diff changeset
   894
489c9b5090e2 Initial load
duke
parents:
diff changeset
   895
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   896
  Component(const char *name, const char *type, int usedef);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   897
  ~Component();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   898
489c9b5090e2 Initial load
duke
parents:
diff changeset
   899
489c9b5090e2 Initial load
duke
parents:
diff changeset
   900
  // Return 'true' if this use def info equals the parameter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   901
  bool  is(int use_def_kill_enum) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   902
  // Return 'true' if this use def info is a superset of parameter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   903
  bool  isa(int use_def_kill_enum) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   904
  int   promote_use_def_info(int new_use_def);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   905
  const char *base_type(FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   906
  // Form::DataType is_base_constant(FormDict &globals);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   907
489c9b5090e2 Initial load
duke
parents:
diff changeset
   908
  void dump();                     // Debug printer
489c9b5090e2 Initial load
duke
parents:
diff changeset
   909
  void output(FILE *fp);           // Write to output files
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 13104
diff changeset
   910
  const char* getUsedefName();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   911
489c9b5090e2 Initial load
duke
parents:
diff changeset
   912
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   913
  // Implementation depends upon working bit intersection and union.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   914
  enum use_def_enum {
26910
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   915
    INVALID   = 0x0,
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   916
    USE       = 0x1,
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   917
    DEF       = 0x2,
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   918
    USE_DEF   = USE | DEF,
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   919
    KILL      = 0x4,
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   920
    USE_KILL  = USE | KILL,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   921
    SYNTHETIC = 0x8,
26910
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   922
    TEMP      = USE | SYNTHETIC,
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   923
    TEMP_DEF  = TEMP | DEF,
253efabfd968 8058880: Introduce identifier TEMP_DEF for effects in adl.
goetz
parents: 22872
diff changeset
   924
    CALL      = 0x10
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   925
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   926
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   927
489c9b5090e2 Initial load
duke
parents:
diff changeset
   928
489c9b5090e2 Initial load
duke
parents:
diff changeset
   929
//------------------------------MatchNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   930
class MatchNode : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   931
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   932
489c9b5090e2 Initial load
duke
parents:
diff changeset
   933
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   934
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
   935
  const char  *_result;            // The name of the output of this node
489c9b5090e2 Initial load
duke
parents:
diff changeset
   936
  const char  *_name;              // The name that appeared in the match rule
489c9b5090e2 Initial load
duke
parents:
diff changeset
   937
  const char  *_opType;            // The Operation/Type matched
489c9b5090e2 Initial load
duke
parents:
diff changeset
   938
  MatchNode   *_lChild;            // Left child in expression tree
489c9b5090e2 Initial load
duke
parents:
diff changeset
   939
  MatchNode   *_rChild;            // Right child in expression tree
489c9b5090e2 Initial load
duke
parents:
diff changeset
   940
  int         _numleaves;          // Sum of numleaves for all direct children
489c9b5090e2 Initial load
duke
parents:
diff changeset
   941
  ArchDesc    &_AD;                // Reference to ArchDesc object
489c9b5090e2 Initial load
duke
parents:
diff changeset
   942
  char        *_internalop;        // String representing internal operand
489c9b5090e2 Initial load
duke
parents:
diff changeset
   943
  int         _commutative_id;     // id of commutative operation
489c9b5090e2 Initial load
duke
parents:
diff changeset
   944
489c9b5090e2 Initial load
duke
parents:
diff changeset
   945
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
   946
  MatchNode(ArchDesc &ad, const char *result = 0, const char *expr = 0,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   947
            const char *opType=0, MatchNode *lChild=NULL,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   948
            MatchNode *rChild=NULL);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   949
  MatchNode(ArchDesc &ad, MatchNode& mNode); // Shallow copy constructor;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   950
  MatchNode(ArchDesc &ad, MatchNode& mNode, int clone); // Construct clone
489c9b5090e2 Initial load
duke
parents:
diff changeset
   951
  ~MatchNode();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   952
489c9b5090e2 Initial load
duke
parents:
diff changeset
   953
  // return 0 if not found:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   954
  // return 1 if found and position is incremented by operand offset in rule
489c9b5090e2 Initial load
duke
parents:
diff changeset
   955
  bool       find_name(const char *str, int &position) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   956
  bool       find_type(const char *str, int &position) const;
2129
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
   957
  virtual void append_components(FormDict& locals, ComponentList& components,
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
   958
                                 bool def_flag = false) const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   959
  bool       base_operand(uint &position, FormDict &globals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   960
                         const char * &result, const char * &name,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   961
                         const char * &opType) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   962
  // recursive count on operands
489c9b5090e2 Initial load
duke
parents:
diff changeset
   963
  uint       num_consts(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   964
  uint       num_const_ptrs(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   965
  // recursive count of constants with specified type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   966
  uint       num_consts(FormDict &globals, Form::DataType type) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   967
  // uint       num_consts() const;   // Local inspection only
489c9b5090e2 Initial load
duke
parents:
diff changeset
   968
  int        needs_ideal_memory_edge(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   969
  int        needs_base_oop_edge() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   970
489c9b5090e2 Initial load
duke
parents:
diff changeset
   971
  // Help build instruction predicates.  Search for operand names.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   972
  void count_instr_names( Dict &names );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   973
  int build_instr_pred( char *buf, const char *name, int cnt );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   974
  void build_internalop( );
489c9b5090e2 Initial load
duke
parents:
diff changeset
   975
489c9b5090e2 Initial load
duke
parents:
diff changeset
   976
  // Return the name of the operands associated with reducing to this operand:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   977
  // The result type, plus the left and right sides of the binary match
489c9b5090e2 Initial load
duke
parents:
diff changeset
   978
  // Return NULL if there is no left or right hand side
489c9b5090e2 Initial load
duke
parents:
diff changeset
   979
  bool       sets_result()   const;    // rule "Set"s result of match
489c9b5090e2 Initial load
duke
parents:
diff changeset
   980
  const char *reduce_right(FormDict &globals)  const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   981
  const char *reduce_left (FormDict &globals)  const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   982
489c9b5090e2 Initial load
duke
parents:
diff changeset
   983
  // Recursive version of check in MatchRule
2129
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
   984
  int        cisc_spill_match(FormDict& globals, RegisterForm* registers,
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
   985
                              MatchNode* mRule2, const char* &operand,
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
   986
                              const char* &reg_type);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   987
  int        cisc_spill_merge(int left_result, int right_result);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   988
2129
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
   989
  virtual bool equivalent(FormDict& globals, MatchNode* mNode2);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   990
489c9b5090e2 Initial load
duke
parents:
diff changeset
   991
  void       count_commutative_op(int& count);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   992
  void       swap_commutative_op(bool atroot, int count);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   993
489c9b5090e2 Initial load
duke
parents:
diff changeset
   994
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   995
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   996
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   997
489c9b5090e2 Initial load
duke
parents:
diff changeset
   998
//------------------------------MatchRule--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   999
class MatchRule : public MatchNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1000
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1001
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1002
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1003
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1004
  const char *_machType;            // Machine type index
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1005
  int         _depth;               // Expression tree depth
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1006
  char       *_construct;           // String representing C++ constructor code
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1007
  int         _numchilds;           // Number of direct children
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1008
  MatchRule  *_next;                // Pointer to next match rule
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1009
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1010
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1011
  MatchRule(ArchDesc &ad);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1012
  MatchRule(ArchDesc &ad, MatchRule* mRule); // Shallow copy constructor;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1013
  MatchRule(ArchDesc &ad, MatchNode* mroot, int depth, char* construct, int numleaves);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1014
  ~MatchRule();
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1015
2129
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
  1016
  virtual void append_components(FormDict& locals, ComponentList& components, bool def_flag = false) const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1017
  // Recursive call on all operands' match rules in my match rule.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1018
  bool       base_operand(uint &position, FormDict &globals,
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1019
                         const char * &result, const char * &name,
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1020
                         const char * &opType) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1021
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1022
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1023
  bool       is_base_register(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1024
  Form::DataType is_base_constant(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1025
  bool       is_chain_rule(FormDict &globals) const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1026
  int        is_ideal_copy() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1027
  int        is_expensive() const;     // node matches ideal 'CosD'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1028
  bool       is_ideal_if()   const;    // node matches ideal 'If'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1029
  bool       is_ideal_fastlock() const; // node matches ideal 'FastLock'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1030
  bool       is_ideal_jump()   const;  // node matches ideal 'Jump'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1031
  bool       is_ideal_membar() const;  // node matches ideal 'MemBarXXX'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1032
  bool       is_ideal_loadPC() const;  // node matches ideal 'LoadPC'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1033
  bool       is_ideal_box() const;     // node matches ideal 'Box'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1034
  bool       is_ideal_goto() const;    // node matches ideal 'Goto'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1035
  bool       is_ideal_loopEnd() const; // node matches ideal 'LoopEnd'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1036
  bool       is_ideal_bool() const;    // node matches ideal 'Bool'
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents: 11196
diff changeset
  1037
  bool       is_vector() const;        // vector instruction
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1038
  Form::DataType is_ideal_load() const;// node matches ideal 'LoadXNode'
3272
5a1e113bfed5 6857159: local schedule failed with checkcast of Thread.currentThread()
never
parents: 2131
diff changeset
  1039
  // Should antidep checks be disabled for this rule
5a1e113bfed5 6857159: local schedule failed with checkcast of Thread.currentThread()
never
parents: 2131
diff changeset
  1040
  // See definition of MatchRule::skip_antidep_check
5a1e113bfed5 6857159: local schedule failed with checkcast of Thread.currentThread()
never
parents: 2131
diff changeset
  1041
  bool skip_antidep_check() const;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1042
  Form::DataType is_ideal_store() const;// node matches ideal 'StoreXNode'
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1043
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1044
  // Check if 'mRule2' is a cisc-spill variant of this MatchRule
2129
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
  1045
  int        matchrule_cisc_spill_match(FormDict &globals, RegisterForm* registers,
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
  1046
                                        MatchRule* mRule2, const char* &operand,
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
  1047
                                        const char* &reg_type);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1048
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1049
  // Check if 'mRule2' is equivalent to this MatchRule
2129
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
  1050
  virtual bool equivalent(FormDict& globals, MatchNode* mRule2);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1051
2129
e810a33b5c67 6778669: Patch from Red Hat -- fixes compilation errors
twisti
parents: 2125
diff changeset
  1052
  void       matchrule_swap_commutative_op(const char* instr_ident, int count, int& match_rules_cnt);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1053
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1054
  void dump();
13971
3c568f3dacca 8000592: Improve adlc usability
kvn
parents: 13104
diff changeset
  1055
  void output_short(FILE *fp);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1056
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1057
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1058
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1059
//------------------------------Attribute--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1060
class Attribute : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1061
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1062
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1063
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1064
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1065
  char *_ident;                    // Name of predefined attribute
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1066
  char *_val;                      // C++ source which evaluates to constant
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1067
  int   _atype;                    // Either INS_ATTR or OP_ATTR
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1068
  int   int_val(ArchDesc &ad);     // Return atoi(_val), ensuring syntax.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1069
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1070
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1071
  Attribute(char *id, char* val, int type);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1072
  ~Attribute();
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1073
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1074
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1075
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1076
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1077
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1078
//------------------------------FormatRule-------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1079
class FormatRule : public Form {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1080
private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1081
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1082
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1083
  // Public Data
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1084
  // There is an entry in _strings, perhaps NULL, that precedes each _rep_vars
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1085
  NameList  _strings;              // Strings passed through to tty->print
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1086
  NameList  _rep_vars;             // replacement variables
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1087
  char     *_temp;                 // String representing the assembly code
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1088
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1089
  // Public Methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1090
  FormatRule(char *temp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1091
  ~FormatRule();
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1092
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1093
  void dump();
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1094
  void output(FILE *fp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1095
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
  1096
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
  1097
#endif // SHARE_VM_ADLC_FORMSSEL_HPP