Debian Codegraph @

js/src/jit/riscv64/extension/extension-riscv-a.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_extension_Extension_riscv_a_h_
5 #define jit_riscv64_extension_Extension_riscv_a_h_
6 #include "mozilla/Assertions.h"
7
8 #include <stdint.h>
9
10 #include "jit/riscv64/extension/base-assembler-riscv.h"
11 #include "jit/riscv64/Register-riscv64.h"
12 namespace js {
13 namespace jit {
14 class AssemblerRISCVA : public AssemblerRiscvBase {
15 // RV32A Standard Extension
16 public:
17 void lr_w(bool aq, bool rl, Register rd, Register rs1);
18 void sc_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
19 void amoswap_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
20 void amoadd_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
21 void amoxor_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
22 void amoand_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
23 void amoor_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
24 void amomin_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
25 void amomax_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
26 void amominu_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
27 void amomaxu_w(bool aq, bool rl, Register rd, Register rs1, Register rs2);
28
29 #ifdef JS_CODEGEN_RISCV64
30 // RV64A Standard Extension (in addition to RV32A)
31 void lr_d(bool aq, bool rl, Register rd, Register rs1);
32 void sc_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
33 void amoswap_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
34 void amoadd_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
35 void amoxor_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
36 void amoand_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
37 void amoor_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
38 void amomin_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
39 void amomax_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
40 void amominu_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
41 void amomaxu_d(bool aq, bool rl, Register rd, Register rs1, Register rs2);
42 #endif
43 };
44 } // namespace jit
45 } // namespace js
46 #endif // jit_riscv64_extension_Extension_riscv_A_h_