v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
reglist-arm.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_ARM_REGLIST_ARM_H_
6#define V8_CODEGEN_ARM_REGLIST_ARM_H_
7
10
11namespace v8 {
12namespace internal {
13
18
19// Register list in load/store instructions
20// Note that the bit values must match those used in actual instruction encoding
21
22// Caller-saved/arguments registers
23const RegList kJSCallerSaved = {r0, // r0 a1
24 r1, // r1 a2
25 r2, // r2 a3
26 r3}; // r3 a4
27
28const int kNumJSCallerSaved = 4;
29
30// Callee-saved registers preserved when switching from C to JavaScript
31const RegList kCalleeSaved = {r4, // r4 v1
32 r5, // r5 v2
33 r6, // r6 v3
34 r7, // r7 v4 (cp in JavaScript code)
35 r8, // r8 v5 (pp in JavaScript code)
36 r9, // r9 v6
37 r10, // r10 v7
38 r11}; // r11 v8 (fp in JavaScript code)
39
40// When calling into C++ (only for C++ calls that can't cause a GC).
41// The call code will take care of lr, fp, etc.
42const RegList kCallerSaved = {r0, // r0
43 r1, // r1
44 r2, // r2
45 r3, // r3
46 r9}; // r9
47
48const int kNumCalleeSaved = 8;
49
50// Double registers d8 to d15 are callee-saved.
52
53} // namespace internal
54} // namespace v8
55
56#endif // V8_CODEGEN_ARM_REGLIST_ARM_H_
const int kNumJSCallerSaved
Definition reglist-arm.h:28
const RegList kCalleeSaved
Definition reglist-arm.h:31
const RegList kCallerSaved
Definition reglist-arm.h:42
const RegList kJSCallerSaved
Definition reglist-arm.h:23
constexpr Register r11
const int kNumCalleeSaved
Definition reglist-arm.h:48
const int kNumDoubleCalleeSaved
Definition reglist-arm.h:51
#define ASSERT_TRIVIALLY_COPYABLE(T)
Definition macros.h:267