v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
reglist-ppc.h
Go to the documentation of this file.
1// Copyright 2022 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_CODEGEN_PPC_REGLIST_PPC_H_
6#define V8_CODEGEN_PPC_REGLIST_PPC_H_
7
10
11namespace v8 {
12namespace internal {
13
14using RegList = RegListBase<Register>;
15using DoubleRegList = RegListBase<DoubleRegister>;
19
20// Register list in load/store instructions
21// Note that the bit values must match those used in actual instruction encoding
22
23// Caller-saved/arguments registers
24const RegList kJSCallerSaved = {r3, // a1
25 r4, // a2
26 r5, // a3
27 r6, // a4
28 r7, // a5
29 r8, // a6
30 r9, // a7
31 r10, // a8
32 r11};
33
34const int kNumJSCallerSaved = 9;
35
36// Return the code of the n-th caller-saved register available to JavaScript
37// e.g. JSCallerSavedReg(0) returns r0.code() == 0
39
40// Callee-saved registers preserved when switching from C to JavaScript
41const RegList kCalleeSaved = {r14, r15, r16, r17, r18, r19, r20, r21, r22,
42 r23, r24, r25, r26, r27, r28, r29, r30, fp};
43
44const int kNumCalleeSaved = 18;
45
46const DoubleRegList kCallerSavedDoubles = {d0, d1, d2, d3, d4, d5, d6,
47 d7, d8, d9, d10, d11, d12, d13};
48
49const Simd128RegList kCallerSavedSimd128s = {v0, v1, v2, v3, v4, v5, v6,
50 v7, v8, v9, v10, v11, v12, v13,
51 v14, v15, v16, v17, v18, v19};
52
54
55const DoubleRegList kCalleeSavedDoubles = {d14, d15, d16, d17, d18, d19,
56 d20, d21, d22, d23, d24, d25,
57 d26, d27, d28, d29, d30, d31};
58
60
61} // namespace internal
62} // namespace v8
63
64#endif // V8_CODEGEN_PPC_REGLIST_PPC_H_
RegListBase< DoubleRegister > DoubleRegList
Definition reglist-arm.h:15
const int kNumJSCallerSaved
Definition reglist-arm.h:28
const RegList kCalleeSaved
Definition reglist-arm.h:31
int JSCallerSavedCode(int n)
RegListBase< Register > RegList
Definition reglist-arm.h:14
const DoubleRegList kCalleeSavedDoubles
Definition reglist-ppc.h:55
const int kNumCallerSavedDoubles
Definition reglist-ppc.h:53
const int kNumCalleeSavedDoubles
Definition reglist-ppc.h:59
const DoubleRegList kCallerSavedDoubles
Definition reglist-ppc.h:46
const RegList kJSCallerSaved
Definition reglist-arm.h:23
constexpr Register r11
const Simd128RegList kCallerSavedSimd128s
Definition reglist-ppc.h:49
const int kNumCalleeSaved
Definition reglist-arm.h:48
#define ASSERT_TRIVIALLY_COPYABLE(T)
Definition macros.h:267