Thu, 14 Apr 2011 13:45:41 -0700
Merge
duke@435 | 1 | /* |
trims@1907 | 2 | * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | * |
duke@435 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | * under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | * published by the Free Software Foundation. |
duke@435 | 8 | * |
duke@435 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | * accompanied this code). |
duke@435 | 14 | * |
duke@435 | 15 | * You should have received a copy of the GNU General Public License version |
duke@435 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | * |
trims@1907 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | * or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | * questions. |
duke@435 | 22 | * |
duke@435 | 23 | */ |
duke@435 | 24 | |
stefank@2314 | 25 | #ifndef CPU_X86_VM_STUBROUTINES_X86_64_HPP |
stefank@2314 | 26 | #define CPU_X86_VM_STUBROUTINES_X86_64_HPP |
stefank@2314 | 27 | |
duke@435 | 28 | // This file holds the platform specific parts of the StubRoutines |
duke@435 | 29 | // definition. See stubRoutines.hpp for a description on how to |
duke@435 | 30 | // extend it. |
duke@435 | 31 | |
duke@435 | 32 | static bool returns_to_call_stub(address return_pc) { return return_pc == _call_stub_return_address; } |
duke@435 | 33 | |
twisti@1734 | 34 | enum platform_dependent_constants { |
twisti@1734 | 35 | code_size1 = 19000, // simply increase if too small (assembler will crash if too small) |
twisti@1734 | 36 | code_size2 = 22000 // simply increase if too small (assembler will crash if too small) |
twisti@1734 | 37 | }; |
twisti@1734 | 38 | |
twisti@1734 | 39 | // MethodHandles adapters |
twisti@1734 | 40 | enum method_handles_platform_dependent_constants { |
twisti@2201 | 41 | method_handles_adapters_code_size = 40000 |
duke@435 | 42 | }; |
duke@435 | 43 | |
never@739 | 44 | class x86 { |
duke@435 | 45 | friend class StubGenerator; |
duke@435 | 46 | |
duke@435 | 47 | private: |
duke@435 | 48 | static address _get_previous_fp_entry; |
duke@435 | 49 | static address _verify_mxcsr_entry; |
duke@435 | 50 | |
duke@435 | 51 | static address _f2i_fixup; |
duke@435 | 52 | static address _f2l_fixup; |
duke@435 | 53 | static address _d2i_fixup; |
duke@435 | 54 | static address _d2l_fixup; |
duke@435 | 55 | |
duke@435 | 56 | static address _float_sign_mask; |
duke@435 | 57 | static address _float_sign_flip; |
duke@435 | 58 | static address _double_sign_mask; |
duke@435 | 59 | static address _double_sign_flip; |
duke@435 | 60 | static address _mxcsr_std; |
duke@435 | 61 | |
duke@435 | 62 | public: |
duke@435 | 63 | |
duke@435 | 64 | static address get_previous_fp_entry() |
duke@435 | 65 | { |
duke@435 | 66 | return _get_previous_fp_entry; |
duke@435 | 67 | } |
duke@435 | 68 | |
duke@435 | 69 | static address verify_mxcsr_entry() |
duke@435 | 70 | { |
duke@435 | 71 | return _verify_mxcsr_entry; |
duke@435 | 72 | } |
duke@435 | 73 | |
duke@435 | 74 | static address f2i_fixup() |
duke@435 | 75 | { |
duke@435 | 76 | return _f2i_fixup; |
duke@435 | 77 | } |
duke@435 | 78 | |
duke@435 | 79 | static address f2l_fixup() |
duke@435 | 80 | { |
duke@435 | 81 | return _f2l_fixup; |
duke@435 | 82 | } |
duke@435 | 83 | |
duke@435 | 84 | static address d2i_fixup() |
duke@435 | 85 | { |
duke@435 | 86 | return _d2i_fixup; |
duke@435 | 87 | } |
duke@435 | 88 | |
duke@435 | 89 | static address d2l_fixup() |
duke@435 | 90 | { |
duke@435 | 91 | return _d2l_fixup; |
duke@435 | 92 | } |
duke@435 | 93 | |
duke@435 | 94 | static address float_sign_mask() |
duke@435 | 95 | { |
duke@435 | 96 | return _float_sign_mask; |
duke@435 | 97 | } |
duke@435 | 98 | |
duke@435 | 99 | static address float_sign_flip() |
duke@435 | 100 | { |
duke@435 | 101 | return _float_sign_flip; |
duke@435 | 102 | } |
duke@435 | 103 | |
duke@435 | 104 | static address double_sign_mask() |
duke@435 | 105 | { |
duke@435 | 106 | return _double_sign_mask; |
duke@435 | 107 | } |
duke@435 | 108 | |
duke@435 | 109 | static address double_sign_flip() |
duke@435 | 110 | { |
duke@435 | 111 | return _double_sign_flip; |
duke@435 | 112 | } |
duke@435 | 113 | |
duke@435 | 114 | static address mxcsr_std() |
duke@435 | 115 | { |
duke@435 | 116 | return _mxcsr_std; |
duke@435 | 117 | } |
duke@435 | 118 | }; |
stefank@2314 | 119 | |
stefank@2314 | 120 | #endif // CPU_X86_VM_STUBROUTINES_X86_64_HPP |