v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
reglist-x64.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_X64_REGLIST_X64_H_
6#define V8_CODEGEN_X64_REGLIST_X64_H_
7
8#include "src/base/macros.h"
11
12namespace v8 {
13namespace internal {
14
15using RegList = RegListBase<Register>;
16using DoubleRegList = RegListBase<DoubleRegister>;
19
20constexpr RegList kJSCallerSaved = {
21 rax, rcx, rdx,
22 rbx, // used as a caller-saved register in JavaScript code
23 rdi}; // callee function
24
25constexpr RegList kCallerSaved =
26#ifdef V8_TARGET_OS_WIN
27 {rax, rcx, rdx, r8, r9, r10, r11};
28#else
29 {rax, rcx, rdx, rdi, rsi, r8, r9, r10, r11};
30#endif // V8_TARGET_OS_WIN
31
32constexpr int kNumJSCallerSaved = 5;
33
34} // namespace internal
35} // namespace v8
36
37#endif // V8_CODEGEN_X64_REGLIST_X64_H_
RegListBase< DoubleRegister > DoubleRegList
Definition reglist-arm.h:15
const int kNumJSCallerSaved
Definition reglist-arm.h:28
RegListBase< Register > RegList
Definition reglist-arm.h:14
const RegList kCallerSaved
Definition reglist-arm.h:42
const RegList kJSCallerSaved
Definition reglist-arm.h:23
constexpr Register r11
#define ASSERT_TRIVIALLY_COPYABLE(T)
Definition macros.h:267