• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 #ifndef V8_CODEGEN_S390_REGLIST_S390_H_
6 #define V8_CODEGEN_S390_REGLIST_S390_H_
7 
8 #include "src/codegen/register-arch.h"
9 #include "src/codegen/reglist-base.h"
10 
11 namespace v8 {
12 namespace internal {
13 
14 using RegList = RegListBase<Register>;
15 using DoubleRegList = RegListBase<DoubleRegister>;
16 ASSERT_TRIVIALLY_COPYABLE(RegList);
17 ASSERT_TRIVIALLY_COPYABLE(DoubleRegList);
18 
19 // Register list in load/store instructions
20 // Note that the bit values must match those used in actual instruction encoding
21 
22 // Caller-saved/arguments registers
23 const RegList kJSCallerSaved = {r1, r2,  // r2  a1
24                                 r3,      // r3  a2
25                                 r4,      // r4  a3
26                                 r5};     // r5  a4
27 
28 const int kNumJSCallerSaved = 5;
29 
30 // Callee-saved registers preserved when switching from C to JavaScript
31 const RegList kCalleeSaved = {r6,    // r6 (argument passing in CEntryStub)
32                                      //    (HandleScope logic in MacroAssembler)
33                               r7,    // r7 (argument passing in CEntryStub)
34                                      //    (HandleScope logic in MacroAssembler)
35                               r8,    // r8 (argument passing in CEntryStub)
36                                      //    (HandleScope logic in MacroAssembler)
37                               r9,    // r9 (HandleScope logic in MacroAssembler)
38                               r10,   // r10 (Roots register in Javascript)
39                               fp,    // r11 (fp in Javascript)
40                               ip,    // r12 (ip in Javascript)
41                               r13};  // r13 (cp in Javascript)
42 // r15;   // r15 (sp in Javascript)
43 
44 const int kNumCalleeSaved = 8;
45 
46 const DoubleRegList kCallerSavedDoubles = {d0, d1, d2, d3, d4, d5, d6, d7};
47 
48 const int kNumCallerSavedDoubles = 8;
49 
50 const DoubleRegList kCalleeSavedDoubles = {d8,  d9,  d10, d11,
51                                            d12, d13, d14, d15};
52 
53 const int kNumCalleeSavedDoubles = 8;
54 
55 }  // namespace internal
56 }  // namespace v8
57 
58 #endif  // V8_CODEGEN_S390_REGLIST_S390_H_
59