Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: src/s390/constants-s390.cc

Issue 1725243004: S390: Initial impl of S390 asm, masm, code-stubs,... (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Updated BUILD.gn + cpu-s390.cc to addr @jochen's comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_PPC 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/ppc/constants-ppc.h" 7 #include "src/s390/constants-s390.h"
8
9 8
10 namespace v8 { 9 namespace v8 {
11 namespace internal { 10 namespace internal {
12 11
13 // These register names are defined in a way to match the native disassembler 12 // These register names are defined in a way to match the native disassembler
14 // formatting. See for example the command "objdump -d <binary file>". 13 // formatting. See for example the command "objdump -d <binary file>".
15 const char* Registers::names_[kNumRegisters] = { 14 const char* Registers::names_[kNumRegisters] = {
16 "r0", "sp", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", 15 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
17 "r11", "ip", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", 16 "r8", "r9", "r10", "fp", "ip", "r13", "r14", "sp"};
18 "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "fp"};
19
20 17
21 const char* DoubleRegisters::names_[kNumDoubleRegisters] = { 18 const char* DoubleRegisters::names_[kNumDoubleRegisters] = {
22 "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", 19 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
23 "d11", "d12", "d13", "d14", "d15", "d16", "d17", "d18", "d19", "d20", "d21", 20 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15"};
24 "d22", "d23", "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31"};
25
26 21
27 int DoubleRegisters::Number(const char* name) { 22 int DoubleRegisters::Number(const char* name) {
28 for (int i = 0; i < kNumDoubleRegisters; i++) { 23 for (int i = 0; i < kNumDoubleRegisters; i++) {
29 if (strcmp(names_[i], name) == 0) { 24 if (strcmp(names_[i], name) == 0) {
30 return i; 25 return i;
31 } 26 }
32 } 27 }
33 28
34 // No register with the requested name found. 29 // No register with the requested name found.
35 return kNoRegister; 30 return kNoRegister;
36 } 31 }
37 32
38
39 int Registers::Number(const char* name) { 33 int Registers::Number(const char* name) {
40 // Look through the canonical names. 34 // Look through the canonical names.
41 for (int i = 0; i < kNumRegisters; i++) { 35 for (int i = 0; i < kNumRegisters; i++) {
42 if (strcmp(names_[i], name) == 0) { 36 if (strcmp(names_[i], name) == 0) {
43 return i; 37 return i;
44 } 38 }
45 } 39 }
46 40
47 // No register with the requested name found. 41 // No register with the requested name found.
48 return kNoRegister; 42 return kNoRegister;
49 } 43 }
44
50 } // namespace internal 45 } // namespace internal
51 } // namespace v8 46 } // namespace v8
52 47
53 #endif // V8_TARGET_ARCH_PPC 48 #endif // V8_TARGET_ARCH_S390
OLDNEW
« src/s390/assembler-s390.h ('K') | « src/s390/constants-s390.h ('k') | src/s390/cpu-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698