Debian Codegraph @

js/src/jit/riscv64/constant/Constant-riscv-d.h

raw
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 #ifndef jit_riscv64_constant_Constant_riscv64_d_h_
5 #define jit_riscv64_constant_Constant_riscv64_d_h_
6 #include "jit/riscv64/constant/Base-constant-riscv.h"
7 namespace js {
8 namespace jit {
9
10 enum OpcodeRISCVD : uint32_t {
11 // RV32D Standard Extension
12 RO_FLD = LOAD_FP | (0b011 << kFunct3Shift),
13 RO_FSD = STORE_FP | (0b011 << kFunct3Shift),
14 RO_FMADD_D = MADD | (0b01 << kFunct2Shift),
15 RO_FMSUB_D = MSUB | (0b01 << kFunct2Shift),
16 RO_FNMSUB_D = NMSUB | (0b01 << kFunct2Shift),
17 RO_FNMADD_D = NMADD | (0b01 << kFunct2Shift),
18 RO_FADD_D = OP_FP | (0b0000001 << kFunct7Shift),
19 RO_FSUB_D = OP_FP | (0b0000101 << kFunct7Shift),
20 RO_FMUL_D = OP_FP | (0b0001001 << kFunct7Shift),
21 RO_FDIV_D = OP_FP | (0b0001101 << kFunct7Shift),
22 RO_FSQRT_D = OP_FP | (0b0101101 << kFunct7Shift) | (0b00000 << kRs2Shift),
23 RO_FSGNJ_D = OP_FP | (0b000 << kFunct3Shift) | (0b0010001 << kFunct7Shift),
24 RO_FSGNJN_D = OP_FP | (0b001 << kFunct3Shift) | (0b0010001 << kFunct7Shift),
25 RO_FSQNJX_D = OP_FP | (0b010 << kFunct3Shift) | (0b0010001 << kFunct7Shift),
26 RO_FMIN_D = OP_FP | (0b000 << kFunct3Shift) | (0b0010101 << kFunct7Shift),
27 RO_FMAX_D = OP_FP | (0b001 << kFunct3Shift) | (0b0010101 << kFunct7Shift),
28 RO_FCVT_S_D = OP_FP | (0b0100000 << kFunct7Shift) | (0b00001 << kRs2Shift),
29 RO_FCVT_D_S = OP_FP | (0b0100001 << kFunct7Shift) | (0b00000 << kRs2Shift),
30 RO_FEQ_D = OP_FP | (0b010 << kFunct3Shift) | (0b1010001 << kFunct7Shift),
31 RO_FLT_D = OP_FP | (0b001 << kFunct3Shift) | (0b1010001 << kFunct7Shift),
32 RO_FLE_D = OP_FP | (0b000 << kFunct3Shift) | (0b1010001 << kFunct7Shift),
33 RO_FCLASS_D = OP_FP | (0b001 << kFunct3Shift) | (0b1110001 << kFunct7Shift) |
34 (0b00000 << kRs2Shift),
35 RO_FCVT_W_D = OP_FP | (0b1100001 << kFunct7Shift) | (0b00000 << kRs2Shift),
36 RO_FCVT_WU_D = OP_FP | (0b1100001 << kFunct7Shift) | (0b00001 << kRs2Shift),
37 RO_FCVT_D_W = OP_FP | (0b1101001 << kFunct7Shift) | (0b00000 << kRs2Shift),
38 RO_FCVT_D_WU = OP_FP | (0b1101001 << kFunct7Shift) | (0b00001 << kRs2Shift),
39
40 #ifdef JS_CODEGEN_RISCV64
41 // RV64D Standard Extension (in addition to RV32D)
42 RO_FCVT_L_D = OP_FP | (0b1100001 << kFunct7Shift) | (0b00010 << kRs2Shift),
43 RO_FCVT_LU_D = OP_FP | (0b1100001 << kFunct7Shift) | (0b00011 << kRs2Shift),
44 RO_FMV_X_D = OP_FP | (0b000 << kFunct3Shift) | (0b1110001 << kFunct7Shift) |
45 (0b00000 << kRs2Shift),
46 RO_FCVT_D_L = OP_FP | (0b1101001 << kFunct7Shift) | (0b00010 << kRs2Shift),
47 RO_FCVT_D_LU = OP_FP | (0b1101001 << kFunct7Shift) | (0b00011 << kRs2Shift),
48 RO_FMV_D_X = OP_FP | (0b000 << kFunct3Shift) | (0b1111001 << kFunct7Shift) |
49 (0b00000 << kRs2Shift),
50 #endif
51 };
52 } // namespace jit
53 } // namespace js
54
55 #endif // jit_riscv64_constant_Constant_riscv64_a_h_