v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
register-allocation.h
Go to the documentation of this file.
1// Copyright 2020 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_COMPILER_BACKEND_REGISTER_ALLOCATION_H_
6#define V8_COMPILER_BACKEND_REGISTER_ALLOCATION_H_
7
9#include "src/zone/zone.h"
10
11namespace v8 {
12namespace internal {
13namespace compiler {
14
16
17inline int GetRegisterCount(const RegisterConfiguration* config,
19 switch (kind) {
21 return config->num_general_registers();
23 return config->num_double_registers();
25 return config->num_simd128_registers();
26 }
27}
28
31 switch (kind) {
33 return config->num_allocatable_general_registers();
35 return config->num_allocatable_double_registers();
37 return config->num_allocatable_simd128_registers();
38 }
39}
40
43 switch (kind) {
45 return config->allocatable_general_codes();
47 return config->allocatable_double_codes();
49 return config->allocatable_simd128_codes();
50 }
51}
52
85
86} // namespace compiler
87} // namespace internal
88} // namespace v8
89
90#endif // V8_COMPILER_BACKEND_REGISTER_ALLOCATION_H_
Builtins::Kind kind
Definition builtins.cc:40
const int * GetAllocatableRegisterCodes(const RegisterConfiguration *config, RegisterKind kind)
int GetAllocatableRegisterCount(const RegisterConfiguration *config, RegisterKind kind)
int GetRegisterCount(const RegisterConfiguration *config, RegisterKind kind)
int ByteWidthForStackSlot(MachineRepresentation rep)
constexpr int kSimd128Size
Definition globals.h:706
constexpr int kSimd256Size
Definition globals.h:709
constexpr int kSystemPointerSize
Definition globals.h:410
constexpr int kDoubleSize
Definition globals.h:407