tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Constant-riscv-m.h (1553B)


      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_m_h_
      5 #define jit_riscv64_constant_Constant_riscv64_m_h_
      6 
      7 #include "jit/riscv64/constant/Base-constant-riscv.h"
      8 namespace js {
      9 namespace jit {
     10 
     11 enum OpcodeRISCVM : uint32_t {
     12  // RV32M Standard Extension
     13  RO_MUL = OP | (0b000 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     14  RO_MULH = OP | (0b001 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     15  RO_MULHSU = OP | (0b010 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     16  RO_MULHU = OP | (0b011 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     17  RO_DIV = OP | (0b100 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     18  RO_DIVU = OP | (0b101 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     19  RO_REM = OP | (0b110 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     20  RO_REMU = OP | (0b111 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     21 
     22 #ifdef JS_CODEGEN_RISCV64
     23  // RV64M Standard Extension (in addition to RV32M)
     24  RO_MULW = OP_32 | (0b000 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     25  RO_DIVW = OP_32 | (0b100 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     26  RO_DIVUW = OP_32 | (0b101 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     27  RO_REMW = OP_32 | (0b110 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     28  RO_REMUW = OP_32 | (0b111 << kFunct3Shift) | (0b0000001 << kFunct7Shift),
     29 #endif
     30 };
     31 }  // namespace jit
     32 }  // namespace js
     33 
     34 #endif  // jit_riscv64_extension_CONSTANT_RISCV_M_h_