Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/cpu/s390/c2_MacroAssembler_s390.hpp
40930 views
1
/*
2
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*
23
*/
24
25
#ifndef CPU_S390_C2_MACROASSEMBLER_S390_HPP
26
#define CPU_S390_C2_MACROASSEMBLER_S390_HPP
27
28
// C2_MacroAssembler contains high-level macros for C2
29
30
public:
31
//-------------------------------------------
32
// Special String Intrinsics Implementation.
33
//-------------------------------------------
34
// Intrinsics for CompactStrings
35
// Restores: src, dst
36
// Uses: cnt
37
// Kills: tmp, Z_R0, Z_R1.
38
// Early clobber: result.
39
// Boolean precise controls accuracy of result value.
40
unsigned int string_compress(Register result, Register src, Register dst, Register cnt,
41
Register tmp, bool precise);
42
43
// Inflate byte[] to char[].
44
unsigned int string_inflate_trot(Register src, Register dst, Register cnt, Register tmp);
45
46
// Inflate byte[] to char[].
47
// Restores: src, dst
48
// Uses: cnt
49
// Kills: tmp, Z_R0, Z_R1.
50
unsigned int string_inflate(Register src, Register dst, Register cnt, Register tmp);
51
52
// Inflate byte[] to char[], length known at compile time.
53
// Restores: src, dst
54
// Kills: tmp, Z_R0, Z_R1.
55
// Note:
56
// len is signed int. Counts # characters, not bytes.
57
unsigned int string_inflate_const(Register src, Register dst, Register tmp, int len);
58
59
// Kills src.
60
unsigned int has_negatives(Register result, Register src, Register cnt,
61
Register odd_reg, Register even_reg, Register tmp);
62
63
unsigned int string_compare(Register str1, Register str2, Register cnt1, Register cnt2,
64
Register odd_reg, Register even_reg, Register result, int ae);
65
66
unsigned int array_equals(bool is_array_equ, Register ary1, Register ary2, Register limit,
67
Register odd_reg, Register even_reg, Register result, bool is_byte);
68
69
unsigned int string_indexof(Register result, Register haystack, Register haycnt,
70
Register needle, Register needlecnt, int needlecntval,
71
Register odd_reg, Register even_reg, int ae);
72
73
unsigned int string_indexof_char(Register result, Register haystack, Register haycnt,
74
Register needle, jchar needleChar, Register odd_reg, Register even_reg, bool is_byte);
75
76
#endif // CPU_S390_C2_MACROASSEMBLER_S390_HPP
77
78