src/cpu/mips/vm/stubRoutines_mips_64.hpp

changeset 1
2d8a650513c2
child 6880
52ea28d233d2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/cpu/mips/vm/stubRoutines_mips_64.hpp	Fri Apr 29 00:06:10 2016 +0800
     1.3 @@ -0,0 +1,62 @@
     1.4 +/*
     1.5 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2015, 2016, Loongson Technology. All rights reserved.
     1.7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8 + *
     1.9 + * This code is free software; you can redistribute it and/or modify it
    1.10 + * under the terms of the GNU General Public License version 2 only, as
    1.11 + * published by the Free Software Foundation.
    1.12 + *
    1.13 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.14 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.15 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.16 + * version 2 for more details (a copy is included in the LICENSE file that
    1.17 + * accompanied this code).
    1.18 + *
    1.19 + * You should have received a copy of the GNU General Public License version
    1.20 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.21 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.22 + *
    1.23 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.24 + * or visit www.oracle.com if you need additional information or have any
    1.25 + * questions.
    1.26 + *
    1.27 + */
    1.28 +
    1.29 +// This file holds the platform specific parts of the StubRoutines
    1.30 +// definition. See stubRoutines.hpp for a description on how to
    1.31 +// extend it.
    1.32 +
    1.33 +//static bool    returns_to_call_stub(address return_pc)   { return return_pc == _call_stub_return_address; }
    1.34 +  static bool    returns_to_call_stub(address return_pc){ 	
    1.35 +	  return return_pc == _call_stub_return_address||return_pc == gs2::get_call_stub_compiled_return(); 
    1.36 +  }
    1.37 +
    1.38 +enum platform_dependent_constants
    1.39 +{
    1.40 +  //code_size1 =  19000, // simply increase if too small (assembler will
    1.41 +                      // crash if too small)
    1.42 +  //code_size2 = 22000  // simply increase if too small (assembler will
    1.43 +                      // crash if too small)
    1.44 +  code_size1 = 20000,		// simply increase if too small (assembler will crash if too small)
    1.45 +  code_size2 = 40000		// simply increase if too small (assembler will crash if too small)
    1.46 +};
    1.47 +//aoqi:FIXME class name gs2?
    1.48 +class gs2 {
    1.49 +	friend class StubGenerator;
    1.50 + 	friend class VMStructs;
    1.51 +private:
    1.52 +	// If we call compiled code directly from the call stub we will
    1.53 +  // need to adjust the return back to the call stub to a specialized
    1.54 +  // piece of code that can handle compiled results and cleaning the fpu
    1.55 +  // stack. The variable holds that location.
    1.56 +	static address _call_stub_compiled_return;  
    1.57 +	static address _get_previous_fp_entry;
    1.58 +
    1.59 +public:
    1.60 +  // Call back points for traps in compiled code
    1.61 +	static address get_previous_fp_entry()     { return _get_previous_fp_entry; }
    1.62 +  static address get_call_stub_compiled_return()    { return _call_stub_compiled_return; }
    1.63 +  static void set_call_stub_compiled_return(address ret){ _call_stub_compiled_return = ret; }
    1.64 +
    1.65 +};

mercurial