src/share/vm/c1/c1_MacroAssembler.hpp

Thu, 24 May 2018 18:41:44 +0800

author
aoqi
date
Thu, 24 May 2018 18:41:44 +0800
changeset 8856
ac27a9c85bea
parent 6876
710a3c8b516e
permissions
-rw-r--r--

Merge

     1 /*
     2  * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     8  *
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    12  * version 2 for more details (a copy is included in the LICENSE file that
    13  * accompanied this code).
    14  *
    15  * You should have received a copy of the GNU General Public License version
    16  * 2 along with this work; if not, write to the Free Software Foundation,
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    18  *
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    22  *
    23  */
    25 /*
    26  * This file has been modified by Loongson Technology in 2015. These
    27  * modifications are Copyright (c) 2015 Loongson Technology, and are made
    28  * available on the same license terms set forth above.
    29  */
    31 #ifndef SHARE_VM_C1_C1_MACROASSEMBLER_HPP
    32 #define SHARE_VM_C1_C1_MACROASSEMBLER_HPP
    34 #include "asm/macroAssembler.hpp"
    35 #include "asm/macroAssembler.inline.hpp"
    37 class CodeEmitInfo;
    39 class C1_MacroAssembler: public MacroAssembler {
    40  public:
    41   // creation
    42   C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); }
    44   //----------------------------------------------------
    45   void explicit_null_check(Register base);
    47   void inline_cache_check(Register receiver, Register iCache);
    48   void build_frame(int frame_size_in_bytes, int bang_size_in_bytes);
    49   void remove_frame(int frame_size_in_bytes);
    51   void unverified_entry(Register receiver, Register ic_klass);
    52   void verified_entry();
    53   void verify_stack_oop(int offset) PRODUCT_RETURN;
    54   void verify_not_null_oop(Register r)  PRODUCT_RETURN;
    56 #ifdef TARGET_ARCH_x86
    57 # include "c1_MacroAssembler_x86.hpp"
    58 #endif
    59 #ifdef TARGET_ARCH_mips
    60 # include "c1_MacroAssembler_mips.hpp"
    61 #endif
    62 #ifdef TARGET_ARCH_sparc
    63 # include "c1_MacroAssembler_sparc.hpp"
    64 #endif
    65 #ifdef TARGET_ARCH_arm
    66 # include "c1_MacroAssembler_arm.hpp"
    67 #endif
    68 #ifdef TARGET_ARCH_ppc
    69 # include "c1_MacroAssembler_ppc.hpp"
    70 #endif
    72 };
    76 // A StubAssembler is a MacroAssembler w/ extra functionality for runtime
    77 // stubs. Currently it 'knows' some stub info. Eventually, the information
    78 // may be set automatically or can be asserted when using specialised
    79 // StubAssembler functions.
    81 class StubAssembler: public C1_MacroAssembler {
    82  private:
    83   const char* _name;
    84   bool        _must_gc_arguments;
    85   int         _frame_size;
    86   int         _num_rt_args;
    87   int         _stub_id;
    89  public:
    90   // creation
    91   StubAssembler(CodeBuffer* code, const char * name, int stub_id);
    92   void set_info(const char* name, bool must_gc_arguments);
    94   void set_frame_size(int size);
    95   void set_num_rt_args(int args);
    97   // accessors
    98   const char* name() const                       { return _name; }
    99   bool  must_gc_arguments() const                { return _must_gc_arguments; }
   100   int frame_size() const                         { return _frame_size; }
   101   int num_rt_args() const                        { return _num_rt_args; }
   102   int stub_id() const                            { return _stub_id; }
   104   // runtime calls (return offset of call to be used by GC map)
   105   int call_RT(Register oop_result1, Register metadata_result, address entry, int args_size = 0);
   106   int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1);
   107   int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2);
   108   int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3);
   109 };
   111 #endif // SHARE_VM_C1_C1_MACROASSEMBLER_HPP

mercurial