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