v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
constant-riscv-zicsr.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_CONSTANT_RISCV_ZICSR_H_
6#define V8_CODEGEN_RISCV_CONSTANT_RISCV_ZICSR_H_
7
9namespace v8 {
10namespace internal {
11// RISCV CSR related bit mask and shift
12const int kFcsrFlagsBits = 5;
13const uint32_t kFcsrFlagsMask = (1 << kFcsrFlagsBits) - 1;
14const int kFcsrFrmBits = 3;
16const uint32_t kFcsrFrmMask = ((1 << kFcsrFrmBits) - 1) << kFcsrFrmShift;
19
20// RV32/RV64 Zicsr Standard Extension
21constexpr Opcode RO_CSRRW = SYSTEM | (0b001 << kFunct3Shift);
22constexpr Opcode RO_CSRRS = SYSTEM | (0b010 << kFunct3Shift);
23constexpr Opcode RO_CSRRC = SYSTEM | (0b011 << kFunct3Shift);
24constexpr Opcode RO_CSRRWI = SYSTEM | (0b101 << kFunct3Shift);
25constexpr Opcode RO_CSRRSI = SYSTEM | (0b110 << kFunct3Shift);
26constexpr Opcode RO_CSRRCI = SYSTEM | (0b111 << kFunct3Shift);
27} // namespace internal
28} // namespace v8
29#endif // V8_CODEGEN_RISCV_CONSTANT_RISCV_ZICSR_H_
constexpr Opcode RO_CSRRWI
constexpr Opcode RO_CSRRS
const uint32_t kFcsrMask
constexpr Opcode RO_CSRRCI
constexpr Opcode RO_CSRRC
const uint32_t kFcsrFlagsMask
constexpr Opcode RO_CSRRSI
const uint32_t kFcsrFrmMask
constexpr Opcode RO_CSRRW