Debian Codegraph @

js/src/jit/loong64/SharedICRegisters-loong64.h

raw
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_SharedICRegisters_loong64_h
8 #define jit_loong64_SharedICRegisters_loong64_h
9
10 #include "jit/loong64/Assembler-loong64.h"
11 #include "jit/Registers.h"
12 #include "jit/RegisterSets.h"
13
14 namespace js {
15 namespace jit {
16
17 // ValueOperands R0, R1, and R2.
18 // R0 == JSReturnReg, and R2 uses registers not preserved across calls. R1 value
19 // should be preserved across calls.
20 static constexpr ValueOperand R0(a2);
21 static constexpr ValueOperand R1(s1);
22 static constexpr ValueOperand R2(a0);
23
24 // ICTailCallReg and ICStubReg
25 // These use registers that are not preserved across calls.
26 static constexpr Register ICTailCallReg = ra;
27 static constexpr Register ICStubReg = t0;
28
29 // Note that ICTailCallReg is actually just the link register.
30 // In LoongArch code emission, we do not clobber ICTailCallReg since we keep
31 // the return address for calls there.
32
33 // FloatReg0 must be equal to ReturnFloatReg.
34 static constexpr FloatRegister FloatReg0 = f0;
35 static constexpr FloatRegister FloatReg1 = f1;
36 static constexpr FloatRegister FloatReg2 = f2;
37 static constexpr FloatRegister FloatReg3 = f3;
38
39 } // namespace jit
40 } // namespace js
41
42 #endif /* jit_loong64_SharedICRegisters_loong64_h */