src/share/vm/c1/c1_MacroAssembler.hpp

changeset 435
a61af66fc99e
child 1730
3cf667df43ef
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/vm/c1/c1_MacroAssembler.hpp	Sat Dec 01 00:00:00 2007 +0000
     1.3 @@ -0,0 +1,82 @@
     1.4 +/*
     1.5 + * Copyright 2000-2005 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.
    1.11 + *
    1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 + * version 2 for more details (a copy is included in the LICENSE file that
    1.16 + * accompanied this code).
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License version
    1.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 + *
    1.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    1.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
    1.24 + * have any questions.
    1.25 + *
    1.26 + */
    1.27 +
    1.28 +class CodeEmitInfo;
    1.29 +
    1.30 +class C1_MacroAssembler: public MacroAssembler {
    1.31 + public:
    1.32 +  // creation
    1.33 +  C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); }
    1.34 +
    1.35 +  //----------------------------------------------------
    1.36 +  void explicit_null_check(Register base);
    1.37 +
    1.38 +  void inline_cache_check(Register receiver, Register iCache);
    1.39 +  void build_frame(int frame_size_in_bytes);
    1.40 +  void method_exit(bool restore_frame);
    1.41 +
    1.42 +  void unverified_entry(Register receiver, Register ic_klass);
    1.43 +  void verified_entry();
    1.44 +  void verify_stack_oop(int offset) PRODUCT_RETURN;
    1.45 +  void verify_not_null_oop(Register r)  PRODUCT_RETURN;
    1.46 +
    1.47 +#include "incls/_c1_MacroAssembler_pd.hpp.incl"
    1.48 +};
    1.49 +
    1.50 +
    1.51 +
    1.52 +// A StubAssembler is a MacroAssembler w/ extra functionality for runtime
    1.53 +// stubs. Currently it 'knows' some stub info. Eventually, the information
    1.54 +// may be set automatically or can be asserted when using specialised
    1.55 +// StubAssembler functions.
    1.56 +
    1.57 +class StubAssembler: public C1_MacroAssembler {
    1.58 + private:
    1.59 +  const char* _name;
    1.60 +  bool        _must_gc_arguments;
    1.61 +  int         _frame_size;
    1.62 +  int         _num_rt_args;
    1.63 +  int         _stub_id;
    1.64 +
    1.65 + public:
    1.66 +  // creation
    1.67 +  StubAssembler(CodeBuffer* code, const char * name, int stub_id);
    1.68 +  void set_info(const char* name, bool must_gc_arguments);
    1.69 +
    1.70 +  void set_frame_size(int size);
    1.71 +  void set_num_rt_args(int args);
    1.72 +
    1.73 +  // accessors
    1.74 +  const char* name() const                       { return _name; }
    1.75 +  bool  must_gc_arguments() const                { return _must_gc_arguments; }
    1.76 +  int frame_size() const                         { return _frame_size; }
    1.77 +  int num_rt_args() const                        { return _num_rt_args; }
    1.78 +  int stub_id() const                            { return _stub_id; }
    1.79 +
    1.80 +  // runtime calls (return offset of call to be used by GC map)
    1.81 +  int call_RT(Register oop_result1, Register oop_result2, address entry, int args_size = 0);
    1.82 +  int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1);
    1.83 +  int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1, Register arg2);
    1.84 +  int call_RT(Register oop_result1, Register oop_result2, address entry, Register arg1, Register arg2, Register arg3);
    1.85 +};

mercurial