Debian Codegraph @

js/src/jit/riscv64/constant/Constant-riscv-f.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_f_h_
5 #define jit_riscv64_constant_Constant_riscv64_f_h_
6 #include "jit/riscv64/constant/Base-constant-riscv.h"
7 namespace js {
8 namespace jit {
9
10 enum OpcodeRISCVF : uint32_t {
11 // RV32F Standard Extension
12 RO_FLW = LOAD_FP | (0b010 << kFunct3Shift),
13 RO_FSW = STORE_FP | (0b010 << kFunct3Shift),
14 RO_FMADD_S = MADD | (0b00 << kFunct2Shift),
15 RO_FMSUB_S = MSUB | (0b00 << kFunct2Shift),
16 RO_FNMSUB_S = NMSUB | (0b00 << kFunct2Shift),
17 RO_FNMADD_S = NMADD | (0b00 << kFunct2Shift),
18 RO_FADD_S = OP_FP | (0b0000000 << kFunct7Shift),
19 RO_FSUB_S = OP_FP | (0b0000100 << kFunct7Shift),
20 RO_FMUL_S = OP_FP | (0b0001000 << kFunct7Shift),
21 RO_FDIV_S = OP_FP | (0b0001100 << kFunct7Shift),
22 RO_FSQRT_S = OP_FP | (0b0101100 << kFunct7Shift) | (0b00000 << kRs2Shift),
23 RO_FSGNJ_S = OP_FP | (0b000 << kFunct3Shift) | (0b0010000 << kFunct7Shift),
24 RO_FSGNJN_S = OP_FP | (0b001 << kFunct3Shift) | (0b0010000 << kFunct7Shift),
25 RO_FSQNJX_S = OP_FP | (0b010 << kFunct3Shift) | (0b0010000 << kFunct7Shift),
26 RO_FMIN_S = OP_FP | (0b000 << kFunct3Shift) | (0b0010100 << kFunct7Shift),
27 RO_FMAX_S = OP_FP | (0b001 << kFunct3Shift) | (0b0010100 << kFunct7Shift),
28 RO_FCVT_W_S = OP_FP | (0b1100000 << kFunct7Shift) | (0b00000 << kRs2Shift),
29 RO_FCVT_WU_S = OP_FP | (0b1100000 << kFunct7Shift) | (0b00001 << kRs2Shift),
30 RO_FMV = OP_FP | (0b1110000 << kFunct7Shift) | (0b000 << kFunct3Shift) |
31 (0b00000 << kRs2Shift),
32 RO_FEQ_S = OP_FP | (0b010 << kFunct3Shift) | (0b1010000 << kFunct7Shift),
33 RO_FLT_S = OP_FP | (0b001 << kFunct3Shift) | (0b1010000 << kFunct7Shift),
34 RO_FLE_S = OP_FP | (0b000 << kFunct3Shift) | (0b1010000 << kFunct7Shift),
35 RO_FCLASS_S = OP_FP | (0b001 << kFunct3Shift) | (0b1110000 << kFunct7Shift),
36 RO_FCVT_S_W = OP_FP | (0b1101000 << kFunct7Shift) | (0b00000 << kRs2Shift),
37 RO_FCVT_S_WU = OP_FP | (0b1101000 << kFunct7Shift) | (0b00001 << kRs2Shift),
38 RO_FMV_W_X = OP_FP | (0b000 << kFunct3Shift) | (0b1111000 << kFunct7Shift),
39
40 #ifdef JS_CODEGEN_RISCV64
41 // RV64F Standard Extension (in addition to RV32F)
42 RO_FCVT_L_S = OP_FP | (0b1100000 << kFunct7Shift) | (0b00010 << kRs2Shift),
43 RO_FCVT_LU_S = OP_FP | (0b1100000 << kFunct7Shift) | (0b00011 << kRs2Shift),
44 RO_FCVT_S_L = OP_FP | (0b1101000 << kFunct7Shift) | (0b00010 << kRs2Shift),
45 RO_FCVT_S_LU = OP_FP | (0b1101000 << kFunct7Shift) | (0b00011 << kRs2Shift),
46 #endif // JS_CODEGEN_RISCV64
47 };
48 } // namespace jit
49 } // namespace js
50
51 #endif // jit_riscv64_constant_Constant_riscv64_f_h_