v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
constant-riscv-m.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_M_H_
6
#define V8_CODEGEN_RISCV_CONSTANT_RISCV_M_H_
7
8
#include "
src/codegen/riscv/base-constants-riscv.h
"
9
namespace
v8
{
10
namespace
internal
{
11
12
// RV32M Standard Extension
13
constexpr
Opcode
RO_MUL
=
14
OP
| (0b000 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
15
constexpr
Opcode
RO_MULH
=
16
OP
| (0b001 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
17
constexpr
Opcode
RO_MULHSU
=
18
OP
| (0b010 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
19
constexpr
Opcode
RO_MULHU
=
20
OP
| (0b011 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
21
constexpr
Opcode
RO_DIV
=
22
OP
| (0b100 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
23
constexpr
Opcode
RO_DIVU
=
24
OP
| (0b101 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
25
constexpr
Opcode
RO_REM
=
26
OP
| (0b110 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
27
constexpr
Opcode
RO_REMU
=
28
OP
| (0b111 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
29
30
#ifdef V8_TARGET_ARCH_RISCV64
31
// RV64M Standard Extension (in addition to RV32M)
32
constexpr
Opcode
RO_MULW =
33
OP_32
| (0b000 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
34
constexpr
Opcode
RO_DIVW =
35
OP_32
| (0b100 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
36
constexpr
Opcode
RO_DIVUW =
37
OP_32
| (0b101 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
38
constexpr
Opcode
RO_REMW =
39
OP_32
| (0b110 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
40
constexpr
Opcode
RO_REMUW =
41
OP_32
| (0b111 <<
kFunct3Shift
) | (0b0000001 <<
kFunct7Shift
);
42
#endif
43
// clang-format on
44
}
// namespace internal
45
}
// namespace v8
46
47
#endif
// V8_CODEGEN_RISCV_CONSTANT_RISCV_M_H_
base-constants-riscv.h
v8::internal::RO_MULH
constexpr Opcode RO_MULH
Definition
constant-riscv-m.h:15
v8::internal::Opcode
Opcode
Definition
constants-loong64.h:234
v8::internal::RO_MULHU
constexpr Opcode RO_MULHU
Definition
constant-riscv-m.h:19
v8::internal::RO_REM
constexpr Opcode RO_REM
Definition
constant-riscv-m.h:25
v8::internal::RO_REMU
constexpr Opcode RO_REMU
Definition
constant-riscv-m.h:27
v8::internal::RO_DIVU
constexpr Opcode RO_DIVU
Definition
constant-riscv-m.h:23
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::kFunct3Shift
const int kFunct3Shift
Definition
base-constants-riscv.h:256
v8::internal::RO_DIV
constexpr Opcode RO_DIV
Definition
constant-riscv-m.h:21
v8::internal::RO_MUL
constexpr Opcode RO_MUL
Definition
constant-riscv-m.h:13
v8::internal::RO_MULHSU
constexpr Opcode RO_MULHSU
Definition
constant-riscv-m.h:17
v8::internal::kFunct7Shift
const int kFunct7Shift
Definition
base-constants-riscv.h:252
v8::internal::OP_32
@ OP_32
Definition
base-constants-riscv.h:643
v8::internal::OP
@ OP
Definition
base-constants-riscv.h:641
v8
Definition
api-arguments-inl.h:19
src
codegen
riscv
constant-riscv-m.h
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0