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

Side by Side Diff: src/mips64/assembler-mips64.h

Issue 1334793004: MIPS64: Add big-endian support for mips64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase ToT. Created 5 years, 2 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
« no previous file with comments | « src/ic/mips64/ic-mips64.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // ----------------------------------------------------------------------------- 72 // -----------------------------------------------------------------------------
73 // Implementation of Register and FPURegister. 73 // Implementation of Register and FPURegister.
74 74
75 // Core register. 75 // Core register.
76 struct Register { 76 struct Register {
77 static const int kNumRegisters = v8::internal::kNumRegisters; 77 static const int kNumRegisters = v8::internal::kNumRegisters;
78 static const int kMaxNumAllocatableRegisters = 14; // v0 through t2 and cp. 78 static const int kMaxNumAllocatableRegisters = 14; // v0 through t2 and cp.
79 static const int kSizeInBytes = 8; 79 static const int kSizeInBytes = 8;
80 static const int kCpRegister = 23; // cp (s7) is the 23rd register. 80 static const int kCpRegister = 23; // cp (s7) is the 23rd register.
81 81
82 #if defined(V8_TARGET_LITTLE_ENDIAN)
83 static const int kMantissaOffset = 0;
84 static const int kExponentOffset = 4;
85 #elif defined(V8_TARGET_BIG_ENDIAN)
86 static const int kMantissaOffset = 4;
87 static const int kExponentOffset = 0;
88 #else
89 #error Unknown endianness
90 #endif
91
82 inline static int NumAllocatableRegisters(); 92 inline static int NumAllocatableRegisters();
83 93
84 static int ToAllocationIndex(Register reg) { 94 static int ToAllocationIndex(Register reg) {
85 DCHECK((reg.code() - 2) < (kMaxNumAllocatableRegisters - 1) || 95 DCHECK((reg.code() - 2) < (kMaxNumAllocatableRegisters - 1) ||
86 reg.is(from_code(kCpRegister))); 96 reg.is(from_code(kCpRegister)));
87 return reg.is(from_code(kCpRegister)) ? 97 return reg.is(from_code(kCpRegister)) ?
88 kMaxNumAllocatableRegisters - 1 : // Return last index for 'cp'. 98 kMaxNumAllocatableRegisters - 1 : // Return last index for 'cp'.
89 reg.code() - 2; // zero_reg and 'at' are skipped. 99 reg.code() - 2; // zero_reg and 'at' are skipped.
90 } 100 }
91 101
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 class EnsureSpace BASE_EMBEDDED { 1503 class EnsureSpace BASE_EMBEDDED {
1494 public: 1504 public:
1495 explicit EnsureSpace(Assembler* assembler) { 1505 explicit EnsureSpace(Assembler* assembler) {
1496 assembler->CheckBuffer(); 1506 assembler->CheckBuffer();
1497 } 1507 }
1498 }; 1508 };
1499 1509
1500 } } // namespace v8::internal 1510 } } // namespace v8::internal
1501 1511
1502 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1512 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-mips64.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698