Print this page
rev 1838 : 6961690: load oops from constant table on SPARC
Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/share/vm/adlc/formssel.hpp
          +++ new/src/share/vm/adlc/formssel.hpp
   1    1  /*
   2      - * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
        2 + * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 51 lines elided ↑ open up ↑
  64   64  class PeepConstraint;
  65   65  class PeepReplace;
  66   66  class MatchList;
  67   67  
  68   68  class ArchDesc;
  69   69  
  70   70  //==============================Instructions===================================
  71   71  //------------------------------InstructForm-----------------------------------
  72   72  class InstructForm : public Form {
  73   73  private:
  74      -  bool          _ideal_only;       // Not a user-defined instruction
       74 +  bool           _ideal_only;       // Not a user-defined instruction
  75   75    // Members used for tracking CISC-spilling
  76      -  uint          _cisc_spill_operand;// Which operand may cisc-spill
       76 +  uint           _cisc_spill_operand;// Which operand may cisc-spill
  77   77    void           set_cisc_spill_operand(uint op_index) { _cisc_spill_operand = op_index; }
  78      -  bool          _is_cisc_alternate;
       78 +  bool           _is_cisc_alternate;
  79   79    InstructForm  *_cisc_spill_alternate;// cisc possible replacement
  80   80    const char    *_cisc_reg_mask_name;
  81   81    InstructForm  *_short_branch_form;
  82   82    bool           _is_short_branch;
       83 +  bool           _is_mach_constant;   // true if Node is a MachConstantNode
  83   84    uint           _alignment;
  84   85  
  85   86  public:
  86   87    // Public Data
  87   88    const char    *_ident;           // Name of this instruction
  88   89    NameList       _parameters;      // Locally defined names
  89   90    FormDict       _localNames;      // Table of operands & their types
  90   91    MatchRule     *_matrule;         // Matching rule for this instruction
  91   92    Opcode        *_opcode;          // Encoding of the opcode for instruction
  92   93    char          *_size;            // Size of instruction
  93   94    InsEncode     *_insencode;       // Encoding class instruction belongs to
       95 +  InsEncode     *_constant;        // Encoding class constant value belongs to
  94   96    Attribute     *_attribs;         // List of Attribute rules
  95   97    Predicate     *_predicate;       // Predicate test for this instruction
  96   98    FormDict       _effects;         // Dictionary of effect rules
  97   99    ExpandRule    *_exprule;         // Expand rule for this instruction
  98  100    RewriteRule   *_rewrule;         // Rewrite rule for this instruction
  99  101    FormatRule    *_format;          // Format for assembly generation
 100  102    Peephole      *_peephole;        // List of peephole rules for instruction
 101  103    const char    *_ins_pipe;        // Instruction Scheduline description class
 102  104  
 103  105    uint          *_uniq_idx;        // Indexes of unique operands
↓ open down ↓ 137 lines elided ↑ open up ↑
 241  243    void                set_cisc_reg_mask_name(const char *rm_name) { _cisc_reg_mask_name = rm_name; }
 242  244    // Output cisc-method prototypes and method bodies
 243  245    void                declare_cisc_version(ArchDesc &AD, FILE *fp_cpp);
 244  246    bool                define_cisc_version (ArchDesc &AD, FILE *fp_cpp);
 245  247  
 246  248    bool                check_branch_variant(ArchDesc &AD, InstructForm *short_branch);
 247  249  
 248  250    bool                is_short_branch() { return _is_short_branch; }
 249  251    void                set_short_branch(bool val) { _is_short_branch = val; }
 250  252  
      253 +  bool                    is_mach_constant() const { return _is_mach_constant;     }
      254 +  void                set_is_mach_constant(bool x) {        _is_mach_constant = x; }
      255 +
 251  256    InstructForm       *short_branch_form() { return _short_branch_form; }
 252  257    bool                has_short_branch_form() { return _short_branch_form != NULL; }
 253  258    // Output short branch prototypes and method bodies
 254  259    void                declare_short_branch_methods(FILE *fp_cpp);
 255  260    bool                define_short_branch_methods(ArchDesc &AD, FILE *fp_cpp);
 256  261  
 257  262    uint                alignment() { return _alignment; }
 258  263    void                set_alignment(uint val) { _alignment = val; }
 259  264  
 260  265    // Seach through operands to determine operands unique positions.
↓ open down ↓ 804 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX