|
| 1 | +Copied verbatim from the linux_x86 version |
| 2 | + |
| 3 | +--- /dev/null Thu Oct 19 11:20:19 2023 |
| 4 | ++++ b/src/hotspot/os_cpu/solaris_x86/safefetch_solaris_x86_64.S Thu Oct 19 11:02:38 2023 |
| 5 | +@@ -0,0 +1,58 @@ |
| 6 | ++# |
| 7 | ++# Copyright (c) 2022 SAP SE. All rights reserved. |
| 8 | ++# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. |
| 9 | ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 10 | ++# |
| 11 | ++# This code is free software; you can redistribute it and/or modify it |
| 12 | ++# under the terms of the GNU General Public License version 2 only, as |
| 13 | ++# published by the Free Software Foundation. |
| 14 | ++# |
| 15 | ++# This code is distributed in the hope that it will be useful, but WITHOUT |
| 16 | ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 17 | ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 18 | ++# version 2 for more details (a copy is included in the LICENSE file that |
| 19 | ++# accompanied this code). |
| 20 | ++# |
| 21 | ++# You should have received a copy of the GNU General Public License version |
| 22 | ++# 2 along with this work; if not, write to the Free Software Foundation, |
| 23 | ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 24 | ++# |
| 25 | ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 26 | ++# or visit www.oracle.com if you need additional information or have any |
| 27 | ++# questions. |
| 28 | ++# |
| 29 | ++ .globl SafeFetch32_impl |
| 30 | ++ .globl SafeFetchN_impl |
| 31 | ++ .globl _SafeFetch32_fault |
| 32 | ++ .globl _SafeFetchN_fault |
| 33 | ++ .globl _SafeFetch32_continuation |
| 34 | ++ .globl _SafeFetchN_continuation |
| 35 | ++ |
| 36 | ++ .text |
| 37 | ++ |
| 38 | ++ |
| 39 | ++ # Support for int SafeFetch32(int* address, int defaultval); |
| 40 | ++ # |
| 41 | ++ # %rdi : address |
| 42 | ++ # %esi : defaultval |
| 43 | ++ .type SafeFetch32_impl,@function |
| 44 | ++SafeFetch32_impl: |
| 45 | ++_SafeFetch32_fault: |
| 46 | ++ movl (%rdi), %eax # load target value, may fault |
| 47 | ++ ret |
| 48 | ++_SafeFetch32_continuation: |
| 49 | ++ movl %esi, %eax # return default |
| 50 | ++ ret |
| 51 | ++ |
| 52 | ++ # Support for intptr_t SafeFetchN(intptr_t* address, intptr_t defaultval); |
| 53 | ++ # |
| 54 | ++ # %rdi : address |
| 55 | ++ # %rsi : defaultval |
| 56 | ++ .type SafeFetchN_impl,@function |
| 57 | ++SafeFetchN_impl: |
| 58 | ++_SafeFetchN_fault: |
| 59 | ++ movq (%rdi), %rax # load target value, may fault |
| 60 | ++ ret |
| 61 | ++_SafeFetchN_continuation: |
| 62 | ++ movq %rsi, %rax # return default |
| 63 | ++ ret |
0 commit comments