MIPS: Move register conventions out of the IC classes.

Port r23391 (c3bf1dc)

Original commit message:
A change to a convention shouldn't require recompilation of ic.h/.cc.

BUG=
R=paul.lind@imgtec.com, vogelheim@chromium.org

Review URL: https://codereview.chromium.org/508673002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6d087613
......@@ -1070,9 +1070,10 @@ source_set("v8_base") {
"src/ic/mips/handler-compiler-mips.cc",
"src/ic/mips/ic-mips.cc",
"src/ic/mips/ic-compiler-mips.cc",
"src/ic/mips/ic-conventions-mips.cc",
"src/ic/mips/stub-cache-mips.cc",
]
} else if (v8_target_arch == "mips64") {
} else if (v8_target_arch == "mips64el") {
sources += [
"src/mips64/assembler-mips64.cc",
"src/mips64/assembler-mips64.h",
......@@ -1106,6 +1107,7 @@ source_set("v8_base") {
"src/ic/mips64/handler-compiler-mips64.cc",
"src/ic/mips64/ic-mips64.cc",
"src/ic/mips64/ic-compiler-mips64.cc",
"src/ic/mips64/ic-conventions-mips64.cc",
"src/ic/mips64/stub-cache-mips64.cc",
]
}
......
......@@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
static Register registers[] = {receiver, name, a3, a0, t0, t1};
return registers;
}
......@@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
DCHECK(a3.is(KeyedStoreIC::MapRegister()));
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(a3.is(StoreConvention::MapRegister()));
static Register registers[] = {receiver, name, a3, t0, t1};
return registers;
}
......
......@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in ra.
Label slow, miss;
Register key = LoadIC::NameRegister();
Register receiver = LoadIC::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -312,8 +312,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -325,8 +325,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -828,7 +828,9 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
}
Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister();
}
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
......@@ -838,7 +840,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss);
// Get the value from the cell.
Register result = StoreIC::ValueRegister();
Register result = StoreConvention::ValueRegister();
__ li(result, Operand(cell));
__ lw(result, FieldMemOperand(result, Cell::kValueOffset));
......
......@@ -40,7 +40,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(KeyedStoreIC::MapRegister()));
map_reg.is(StoreConvention::MapRegister()));
int receiver_count = types->length();
int number_of_handled_maps = 0;
......@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) {
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ li(a0, Operand(Smi::FromInt(strict_mode)));
__ Push(a0);
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/v8.h"
#if V8_TARGET_ARCH_MIPS
#include "src/codegen.h"
#include "src/ic/ic-conventions.h"
namespace v8 {
namespace internal {
// IC register specifications
const Register LoadConvention::ReceiverRegister() { return a1; }
const Register LoadConvention::NameRegister() { return a2; }
const Register VectorLoadConvention::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register FullVectorLoadConvention::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register StoreConvention::ReceiverRegister() { return a1; }
const Register StoreConvention::NameRegister() { return a2; }
const Register StoreConvention::ValueRegister() { return a0; }
const Register StoreConvention::MapRegister() { return a3; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS
......@@ -251,8 +251,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr.
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
......@@ -269,14 +269,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0;
DCHECK(!dictionary.is(ReceiverRegister()));
DCHECK(!dictionary.is(NameRegister()));
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
Label slow;
__ lw(dictionary,
FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), v0, a3, t0);
__ lw(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, t0);
__ Ret();
// Dictionary load failed, go slow (but don't miss).
......@@ -295,8 +296,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
......@@ -307,8 +308,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
......@@ -393,8 +394,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra.
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -418,9 +419,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register key = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
DCHECK(value.is(a0));
Label slow, notin;
......@@ -457,7 +458,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref =
......@@ -467,35 +468,10 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
}
// IC register specifications
const Register LoadIC::ReceiverRegister() { return a1; }
const Register LoadIC::NameRegister() { return a2; }
const Register LoadIC::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register LoadIC::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register StoreIC::ReceiverRegister() { return a1; }
const Register StoreIC::NameRegister() { return a2; }
const Register StoreIC::ValueRegister() { return a0; }
const Register KeyedStoreIC::MapRegister() { return a3; }
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
}
......@@ -506,8 +482,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary;
Register key = NameRegister();
Register receiver = ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
DCHECK(key.is(a2));
DCHECK(receiver.is(a1));
......@@ -666,8 +642,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra.
Label miss;
Register receiver = ReceiverRegister();
Register index = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register index = LoadConvention::NameRegister();
Register scratch = a3;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
......@@ -847,9 +823,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label array, extra, check_if_double_array;
// Register usage.
Register value = ValueRegister();
Register key = NameRegister();
Register receiver = ReceiverRegister();
Register value = StoreConvention::ValueRegister();
Register key = StoreConvention::NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
DCHECK(value.is(a0));
Register receiver_map = a3;
Register elements_map = t2;
......@@ -933,8 +909,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra.
Label slow;
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register scratch1 = a3;
Register scratch2 = t0;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
......@@ -971,7 +947,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
......@@ -980,11 +957,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
DCHECK(ValueRegister().is(a0));
DCHECK(StoreConvention::ValueRegister().is(a0));
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
......@@ -998,7 +975,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// Perform tail call to the entry.
ExternalReference ref =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
......@@ -1008,9 +986,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss;
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register dictionary = a3;
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
......
......@@ -22,8 +22,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register* PropertyAccessCompiler::load_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3, scratch4.
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
static Register registers[] = {receiver, name, a3, a0, a4, a5};
return registers;
}
......@@ -31,9 +31,9 @@ Register* PropertyAccessCompiler::load_calling_convention() {
Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
DCHECK(a3.is(KeyedStoreIC::MapRegister()));
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(a3.is(StoreConvention::MapRegister()));
static Register registers[] = {receiver, name, a3, a4, a5};
return registers;
}
......
......@@ -286,8 +286,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
// The return address is in ra
Label slow, miss;
Register key = LoadIC::NameRegister();
Register receiver = LoadIC::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -313,8 +313,8 @@ void ElementHandlerCompiler::GenerateLoadDictionaryElement(
void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -326,8 +326,8 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
......@@ -829,7 +829,9 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
}
Register NamedStoreHandlerCompiler::value() { return StoreIC::ValueRegister(); }
Register NamedStoreHandlerCompiler::value() {
return StoreConvention::ValueRegister();
}
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
......@@ -839,7 +841,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
FrontendHeader(receiver(), name, &miss);
// Get the value from the cell.
Register result = StoreIC::ValueRegister();
Register result = StoreConvention::ValueRegister();
__ li(result, Operand(cell));
__ ld(result, FieldMemOperand(result, Cell::kValueOffset));
......
......@@ -40,7 +40,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(KeyedStoreIC::MapRegister()));
map_reg.is(StoreConvention::MapRegister()));
int receiver_count = types->length();
int number_of_handled_maps = 0;
......@@ -108,8 +108,8 @@ Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic(
void PropertyICCompiler::GenerateRuntimeSetProperty(MacroAssembler* masm,
StrictMode strict_mode) {
__ Push(StoreIC::ReceiverRegister(), StoreIC::NameRegister(),
StoreIC::ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
__ li(a0, Operand(Smi::FromInt(strict_mode)));
__ Push(a0);
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/v8.h"
#if V8_TARGET_ARCH_MIPS64
#include "src/codegen.h"
#include "src/ic/ic-conventions.h"
namespace v8 {
namespace internal {
// IC register specifications
const Register LoadConvention::ReceiverRegister() { return a1; }
const Register LoadConvention::NameRegister() { return a2; }
const Register VectorLoadConvention::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register FullVectorLoadConvention::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register StoreConvention::ReceiverRegister() { return a1; }
const Register StoreConvention::NameRegister() { return a2; }
const Register StoreConvention::ValueRegister() { return a0; }
const Register StoreConvention::MapRegister() { return a3; }
}
} // namespace v8::internal
#endif // V8_TARGET_ARCH_MIPS64
......@@ -250,8 +250,8 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in lr.
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
......@@ -268,13 +268,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
void LoadIC::GenerateNormal(MacroAssembler* masm) {
Register dictionary = a0;
DCHECK(!dictionary.is(ReceiverRegister()));
DCHECK(!dictionary.is(NameRegister()));
DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
DCHECK(!dictionary.is(LoadConvention::NameRegister()));
Label slow;
__ ld(dictionary,
FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), v0, a3, a4);
__ ld(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
JSObject::kPropertiesOffset));
GenerateDictionaryLoad(masm, &slow, dictionary,
LoadConvention::NameRegister(), v0, a3, a4);
__ Ret();
// Dictionary load failed, go slow (but don't miss).
......@@ -293,8 +294,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
......@@ -305,8 +306,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ mov(LoadIC_TempRegister(), ReceiverRegister());
__ Push(LoadIC_TempRegister(), NameRegister());
__ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
__ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
......@@ -391,8 +392,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
// The return address is in ra.
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(key.is(a2));
......@@ -416,9 +417,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register key = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
DCHECK(value.is(a0));
Label slow, notin;
......@@ -455,7 +456,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
// Perform tail call to the entry.
ExternalReference ref =
......@@ -465,35 +466,10 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
}
// IC register specifications
const Register LoadIC::ReceiverRegister() { return a1; }
const Register LoadIC::NameRegister() { return a2; }
const Register LoadIC::SlotRegister() {
DCHECK(FLAG_vector_ics);
return a0;
}
const Register LoadIC::VectorRegister() {
DCHECK(FLAG_vector_ics);
return a3;
}
const Register StoreIC::ReceiverRegister() { return a1; }
const Register StoreIC::NameRegister() { return a2; }
const Register StoreIC::ValueRegister() { return a0; }
const Register KeyedStoreIC::MapRegister() { return a3; }
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ Push(ReceiverRegister(), NameRegister());
__ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
}
......@@ -504,8 +480,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary;
Register key = NameRegister();
Register receiver = ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
DCHECK(key.is(a2));
DCHECK(receiver.is(a1));
......@@ -671,8 +647,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
// Return address is in ra.
Label miss;
Register receiver = ReceiverRegister();
Register index = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register index = LoadConvention::NameRegister();
Register scratch = a3;
Register result = v0;
DCHECK(!scratch.is(receiver) && !scratch.is(index));
......@@ -856,9 +832,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
Label array, extra, check_if_double_array;
// Register usage.
Register value = ValueRegister();
Register key = NameRegister();
Register receiver = ReceiverRegister();
Register value = StoreConvention::ValueRegister();
Register key = StoreConvention::NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
DCHECK(value.is(a0));
Register receiver_map = a3;
Register elements_map = a6;
......@@ -942,8 +918,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
// Return address is in ra.
Label slow;
Register receiver = ReceiverRegister();
Register key = NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register key = LoadConvention::NameRegister();
Register scratch1 = a3;
Register scratch2 = a4;
DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
......@@ -980,7 +956,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
// Push receiver, key and value for runtime call.
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
ExternalReference ref =
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
......@@ -989,11 +966,11 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
DCHECK(receiver.is(a1));
DCHECK(name.is(a2));
DCHECK(ValueRegister().is(a0));
DCHECK(StoreConvention::ValueRegister().is(a0));
// Get the receiver from the stack and probe the stub cache.
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
......@@ -1007,7 +984,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
void StoreIC::GenerateMiss(MacroAssembler* masm) {
__ Push(ReceiverRegister(), NameRegister(), ValueRegister());
__ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
StoreConvention::ValueRegister());
// Perform tail call to the entry.
ExternalReference ref =
ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
......@@ -1017,9 +995,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
void StoreIC::GenerateNormal(MacroAssembler* masm) {
Label miss;
Register receiver = ReceiverRegister();
Register name = NameRegister();
Register value = ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Register dictionary = a3;
DCHECK(!AreAliased(value, receiver, name, dictionary, a4, a5));
......
......@@ -1954,7 +1954,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss;
Register receiver = LoadIC::ReceiverRegister();
Register receiver = LoadConvention::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
t0, &miss);
__ bind(&miss);
......
......@@ -185,17 +185,17 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
}
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC store (from ic-mips.cc).
Register receiver = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
Register value = StoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......@@ -209,9 +209,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC keyed store call (from ic-mips.cc).
Register receiver = KeyedStoreIC::ReceiverRegister();
Register name = KeyedStoreIC::NameRegister();
Register value = KeyedStoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......
This diff is collapsed.
......@@ -2891,21 +2891,22 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(LoadIC::VectorRegister()));
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
__ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register.
DCHECK(LoadIC::SlotRegister().is(a0));
__ li(LoadIC::SlotRegister(),
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot())));
}
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
}
......@@ -3029,11 +3030,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
// Name is always in a2.
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
}
......@@ -3338,8 +3339,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
......@@ -4154,10 +4155,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
__ li(StoreIC::NameRegister(), Operand(instr->name()));
__ li(StoreConvention::NameRegister(), Operand(instr->name()));
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
......@@ -4385,9 +4386,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
Handle<Code> ic = (instr->strict_mode() == STRICT)
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
......
......@@ -2051,11 +2051,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object = UseFixed(instr->global_object(),
LoadIC::ReceiverRegister());
LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
......@@ -2110,10 +2110,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
......@@ -2175,11 +2176,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
......@@ -2235,9 +2237,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), KeyedStoreIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
LOperand* val = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged());
......@@ -2311,8 +2314,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), StoreIC::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
return MarkAsCall(result, instr);
......
......@@ -1952,7 +1952,7 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
Label miss;
Register receiver = LoadIC::ReceiverRegister();
Register receiver = LoadConvention::ReceiverRegister();
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, a3,
a4, &miss);
__ bind(&miss);
......
......@@ -188,16 +188,16 @@ void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
Register receiver = LoadIC::ReceiverRegister();
Register name = LoadIC::NameRegister();
Register receiver = LoadConvention::ReceiverRegister();
Register name = LoadConvention::NameRegister();
Generate_DebugBreakCallHelper(masm, receiver.bit() | name.bit(), 0);
}
void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
Register receiver = StoreIC::ReceiverRegister();
Register name = StoreIC::NameRegister();
Register value = StoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......@@ -211,9 +211,9 @@ void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
// Calling convention for IC keyed store call (from ic-mips64.cc).
Register receiver = KeyedStoreIC::ReceiverRegister();
Register name = KeyedStoreIC::NameRegister();
Register value = KeyedStoreIC::ValueRegister();
Register receiver = StoreConvention::ReceiverRegister();
Register name = StoreConvention::NameRegister();
Register value = StoreConvention::ValueRegister();
Generate_DebugBreakCallHelper(
masm, receiver.bit() | name.bit() | value.bit(), 0);
}
......
This diff is collapsed.
......@@ -2869,21 +2869,22 @@ template <class T>
void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
DCHECK(FLAG_vector_ics);
Register vector = ToRegister(instr->temp_vector());
DCHECK(vector.is(LoadIC::VectorRegister()));
DCHECK(vector.is(FullVectorLoadConvention::VectorRegister()));
__ li(vector, instr->hydrogen()->feedback_vector());
// No need to allocate this register.
DCHECK(LoadIC::SlotRegister().is(a0));
__ li(LoadIC::SlotRegister(),
DCHECK(FullVectorLoadConvention::SlotRegister().is(a0));
__ li(FullVectorLoadConvention::SlotRegister(),
Operand(Smi::FromInt(instr->hydrogen()->slot())));
}
void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->global_object())
.is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
}
......@@ -3021,11 +3022,11 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->result()).is(v0));
// Name is always in a2.
__ li(LoadIC::NameRegister(), Operand(instr->name()));
__ li(LoadConvention::NameRegister(), Operand(instr->name()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
}
......@@ -3371,8 +3372,8 @@ MemOperand LCodeGen::PrepareKeyedOperand(Register key,
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(LoadIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadIC::NameRegister()));
DCHECK(ToRegister(instr->object()).is(LoadConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(LoadConvention::NameRegister()));
if (FLAG_vector_ics) {
EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
......@@ -4193,10 +4194,10 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
__ li(StoreIC::NameRegister(), Operand(instr->name()));
__ li(StoreConvention::NameRegister(), Operand(instr->name()));
Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
......@@ -4457,9 +4458,9 @@ void LCodeGen::DoStoreKeyed(LStoreKeyed* instr) {
void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
DCHECK(ToRegister(instr->context()).is(cp));
DCHECK(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
DCHECK(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
DCHECK(ToRegister(instr->object()).is(StoreConvention::ReceiverRegister()));
DCHECK(ToRegister(instr->key()).is(StoreConvention::NameRegister()));
DCHECK(ToRegister(instr->value()).is(StoreConvention::ValueRegister()));
Handle<Code> ic = (instr->strict_mode() == STRICT)
? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
......
......@@ -2049,11 +2049,11 @@ LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* global_object = UseFixed(instr->global_object(),
LoadIC::ReceiverRegister());
LOperand* global_object =
UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LLoadGlobalGeneric* result =
new(zone()) LLoadGlobalGeneric(context, global_object, vector);
......@@ -2108,10 +2108,11 @@ LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
......@@ -2174,11 +2175,12 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister());
LOperand* object =
UseFixed(instr->object(), LoadConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
LOperand* vector = NULL;
if (FLAG_vector_ics) {
vector = FixedTemp(LoadIC::VectorRegister());
vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
}
LInstruction* result =
......@@ -2235,9 +2237,10 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), KeyedStoreIC::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister());
LOperand* val = UseFixed(instr->value(), KeyedStoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
DCHECK(instr->object()->representation().IsTagged());
DCHECK(instr->key()->representation().IsTagged());
......@@ -2311,8 +2314,9 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LOperand* context = UseFixed(instr->context(), cp);
LOperand* obj = UseFixed(instr->object(), StoreIC::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreIC::ValueRegister());
LOperand* obj =
UseFixed(instr->object(), StoreConvention::ReceiverRegister());
LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister());
LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val);
return MarkAsCall(result, instr);
......
......@@ -966,6 +966,7 @@
'../../src/ic/mips/handler-compiler-mips.cc',
'../../src/ic/mips/ic-mips.cc',
'../../src/ic/mips/ic-compiler-mips.cc',
'../../src/ic/mips/ic-conventions-mips.cc',
'../../src/ic/mips/stub-cache-mips.cc',
],
}],
......@@ -1003,6 +1004,7 @@
'../../src/ic/mips64/handler-compiler-mips64.cc',
'../../src/ic/mips64/ic-mips64.cc',
'../../src/ic/mips64/ic-compiler-mips64.cc',
'../../src/ic/mips64/ic-conventions-mips64.cc',
'../../src/ic/mips64/stub-cache-mips64.cc',
],
}],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment