v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
reglist-riscv.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_RISCV_REGLIST_RISCV_H_
6#define V8_CODEGEN_RISCV_REGLIST_RISCV_H_
7
10
11namespace v8 {
12namespace internal {
13
14using RegList = RegListBase<Register>;
15using DoubleRegList = RegListBase<DoubleRegister>;
18
19const RegList kJSCallerSaved = {t0, t1, t2, a0, a1, a2, a3, a4, a5, a6, a7, t4};
20
21const int kNumJSCallerSaved = 12;
22
23// Callee-saved registers preserved when switching from C to JavaScript.
24const RegList kCalleeSaved = {fp, // fp/s0
25 s1, // s1
26 s2, // s2
27 s3, // s3 scratch register
28 s4, // s4 scratch register 2
29 s5, // s5
30 s6, // s6 (roots in Javascript code)
31 s7, // s7 (cp in Javascript code)
32 s8, // s8
33 s9, // s9
34 s10, // s10
35 s11}; // s11
36
37const int kNumCalleeSaved = 12;
38
39const DoubleRegList kCalleeSavedFPU = {fs0, fs1, fs2, fs3, fs4, fs5,
40 fs6, fs7, fs8, fs9, fs10, fs11};
41
42const int kNumCalleeSavedFPU = kCalleeSavedFPU.Count();
43
44const DoubleRegList kCallerSavedFPU = {ft0, ft1, ft2, ft3, ft4, ft5, ft6,
45 ft7, fa0, fa1, fa2, fa3, fa4, fa5,
46 fa6, fa7, ft8, ft9, ft10, ft11};
47
49
50// Number of registers for which space is reserved in safepoints. Must be a
51// multiple of 8.
53
54// Define the list of registers actually saved at safepoints.
55// Note that the number of saved registers may be smaller than the reserved
56// space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters.
59
60} // namespace internal
61} // namespace v8
62
63#endif // V8_CODEGEN_RISCV_REGLIST_RISCV_H_
RegListBase< DoubleRegister > DoubleRegList
Definition reglist-arm.h:15
const int kNumJSCallerSaved
Definition reglist-arm.h:28
const int kNumSafepointSavedRegisters
const RegList kCalleeSaved
Definition reglist-arm.h:31
RegListBase< Register > RegList
Definition reglist-arm.h:14
const int kNumSafepointRegisters
const int kNumCallerSavedFPU
const DoubleRegList kCallerSavedFPU
const RegList kJSCallerSaved
Definition reglist-arm.h:23
const DoubleRegList kCalleeSavedFPU
const int kNumCalleeSavedFPU
const int kNumCalleeSaved
Definition reglist-arm.h:48
const RegList kSafepointSavedRegisters
#define ASSERT_TRIVIALLY_COPYABLE(T)
Definition macros.h:267