tor-browser

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

Lowering-loong64.h (4070B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 * vim: set ts=8 sts=2 et sw=2 tw=80:
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef jit_loong64_Lowering_loong64_h
      8 #define jit_loong64_Lowering_loong64_h
      9 
     10 #include "jit/shared/Lowering-shared.h"
     11 
     12 namespace js {
     13 namespace jit {
     14 
     15 class LIRGeneratorLOONG64 : public LIRGeneratorShared {
     16 protected:
     17  LIRGeneratorLOONG64(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
     18      : LIRGeneratorShared(gen, graph, lirGraph) {}
     19 
     20  LTableSwitch* newLTableSwitch(const LAllocation& in,
     21                                const LDefinition& inputCopy);
     22  LTableSwitchV* newLTableSwitchV(const LBoxAllocation& in);
     23 
     24  void lowerForShift(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir,
     25                     MDefinition* lhs, MDefinition* rhs);
     26  template <class LInstr>
     27  void lowerForShiftInt64(LInstr* ins, MDefinition* mir, MDefinition* lhs,
     28                          MDefinition* rhs);
     29 
     30  void lowerForALU(LInstructionHelper<1, 1, 0>* ins, MDefinition* mir,
     31                   MDefinition* input);
     32  void lowerForALU(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir,
     33                   MDefinition* lhs, MDefinition* rhs);
     34  void lowerForALUInt64(LInstructionHelper<INT64_PIECES, INT64_PIECES, 0>* ins,
     35                        MDefinition* mir, MDefinition* input);
     36  void lowerForALUInt64(
     37      LInstructionHelper<INT64_PIECES, 2 * INT64_PIECES, 0>* ins,
     38      MDefinition* mir, MDefinition* lhs, MDefinition* rhs);
     39  void lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* lhs,
     40                        MDefinition* rhs);
     41 
     42  void lowerForFPU(LInstructionHelper<1, 1, 0>* ins, MDefinition* mir,
     43                   MDefinition* input);
     44  void lowerForFPU(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir,
     45                   MDefinition* lhs, MDefinition* rhs);
     46 
     47  // Returns a box allocation. reg2 is ignored on 64-bit platforms.
     48  LBoxAllocation useBoxFixed(MDefinition* mir, Register reg1, Register reg2,
     49                             bool useAtStart = false);
     50 
     51  LAllocation useByteOpRegister(MDefinition* mir);
     52  LAllocation useByteOpRegisterAtStart(MDefinition* mir);
     53  LAllocation useByteOpRegisterOrNonDoubleConstant(MDefinition* mir);
     54  LDefinition tempByteOpRegister();
     55 
     56  LDefinition tempToUnbox();
     57 
     58  bool needTempForPostBarrier() { return true; }
     59 
     60  void lowerUntypedPhiInput(MPhi* phi, uint32_t inputPosition, LBlock* block,
     61                            size_t lirIndex);
     62  void lowerInt64PhiInput(MPhi*, uint32_t, LBlock*, size_t);
     63  void defineInt64Phi(MPhi*, size_t);
     64 
     65  void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
     66  void lowerDivI(MDiv* div);
     67  void lowerDivI64(MDiv* div);
     68  void lowerModI(MMod* mod);
     69  void lowerModI64(MMod* mod);
     70  void lowerUDiv(MDiv* div);
     71  void lowerUDivI64(MDiv* div);
     72  void lowerUMod(MMod* mod);
     73  void lowerUModI64(MMod* mod);
     74  void lowerUrshD(MUrsh* mir);
     75  void lowerPowOfTwoI(MPow* mir);
     76  void lowerBigIntPtrDiv(MBigIntPtrDiv* ins);
     77  void lowerBigIntPtrMod(MBigIntPtrMod* ins);
     78  void lowerBigIntPtrLsh(MBigIntPtrLsh* ins);
     79  void lowerBigIntPtrRsh(MBigIntPtrRsh* ins);
     80  void lowerTruncateDToInt32(MTruncateToInt32* ins);
     81  void lowerTruncateFToInt32(MTruncateToInt32* ins);
     82  void lowerBuiltinInt64ToFloatingPoint(MBuiltinInt64ToFloatingPoint* ins);
     83  void lowerWasmSelectI(MWasmSelect* select);
     84  void lowerWasmSelectI64(MWasmSelect* select);
     85  void lowerWasmBuiltinTruncateToInt64(MWasmBuiltinTruncateToInt64* ins);
     86  void lowerWasmBuiltinTruncateToInt32(MWasmBuiltinTruncateToInt32* ins);
     87  void lowerWasmBuiltinDivI64(MWasmBuiltinDivI64* div);
     88  void lowerWasmBuiltinModI64(MWasmBuiltinModI64* mod);
     89 
     90  void lowerAtomicLoad64(MLoadUnboxedScalar* ins);
     91  void lowerAtomicStore64(MStoreUnboxedScalar* ins);
     92 };
     93 
     94 typedef LIRGeneratorLOONG64 LIRGeneratorSpecific;
     95 
     96 }  // namespace jit
     97 }  // namespace js
     98 
     99 #endif /* jit_loong64_Lowering_loong64_h */