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

Unified Diff: src/mips/assembler-mips-inl.h

Issue 11801002: MIPS: Re-land Crankshaft-generated KeyedLoad stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/assembler-mips-inl.h
diff --git a/src/mips/assembler-mips-inl.h b/src/mips/assembler-mips-inl.h
index 9936e9e5a0aeed0b972c72a6020d3c4653cc937a..38a7cf02a2a94070505b3bd3de05b4644a377565 100644
--- a/src/mips/assembler-mips-inl.h
+++ b/src/mips/assembler-mips-inl.h
@@ -80,9 +80,36 @@ bool Operand::is_reg() const {
}
+int Register::NumAllocatableRegisters() {
+ if (CpuFeatures::IsSupported(FPU)) {
+ return kMaxNumAllocatableRegisters;
+ } else {
+ return kMaxNumAllocatableRegisters - kGPRsPerNonFPUDouble;
+ }
+}
+
+
+int DoubleRegister::NumRegisters() {
+ if (CpuFeatures::IsSupported(FPU)) {
+ return FPURegister::kNumRegisters;
+ } else {
+ return 1;
+ }
+}
+
+
+int DoubleRegister::NumAllocatableRegisters() {
+ if (CpuFeatures::IsSupported(FPU)) {
+ return FPURegister::kMaxNumAllocatableRegisters;
+ } else {
+ return 1;
+ }
+}
+
+
int FPURegister::ToAllocationIndex(FPURegister reg) {
ASSERT(reg.code() % 2 == 0);
- ASSERT(reg.code() / 2 < kNumAllocatableRegisters);
+ ASSERT(reg.code() / 2 < kMaxNumAllocatableRegisters);
ASSERT(reg.is_valid());
ASSERT(!reg.is(kDoubleRegZero));
ASSERT(!reg.is(kLithiumScratchDouble));
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698