Revision: 22527
Author: [email protected]
Date: Tue Jul 22 14:34:55 2014 UTC
Log: MIPS: Never record safepoint with doubles.
Port r22496 (f9dde0f) and r22498 (7a16d69)
BUG=
[email protected]
Review URL: https://codereview.chromium.org/404143002
http://code.google.com/p/v8/source/detail?r=22527
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/mips/code-stubs-mips.h
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.h
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
/branches/bleeding_edge/src/mips/macro-assembler-mips.h
/branches/bleeding_edge/src/mips64/code-stubs-mips64.cc
/branches/bleeding_edge/src/mips64/code-stubs-mips64.h
/branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc
/branches/bleeding_edge/src/mips64/lithium-codegen-mips64.h
/branches/bleeding_edge/src/mips64/macro-assembler-mips64.cc
/branches/bleeding_edge/src/mips64/macro-assembler-mips64.h
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Thu Jul 17 18:24:59
2014 UTC
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Jul 22 14:34:55
2014 UTC
@@ -1138,11 +1138,7 @@
void StoreRegistersStateStub::Generate(MacroAssembler* masm) {
__ mov(t9, ra);
__ pop(ra);
- if (save_doubles_ == kSaveFPRegs) {
- __ PushSafepointRegistersAndDoubles();
- } else {
- __ PushSafepointRegisters();
- }
+ __ PushSafepointRegisters();
__ Jump(t9);
}
@@ -1150,12 +1146,7 @@
void RestoreRegistersStateStub::Generate(MacroAssembler* masm) {
__ mov(t9, ra);
__ pop(ra);
- __ StoreToSafepointRegisterSlot(t9, t9);
- if (save_doubles_ == kSaveFPRegs) {
- __ PopSafepointRegistersAndDoubles();
- } else {
- __ PopSafepointRegisters();
- }
+ __ PopSafepointRegisters();
__ Jump(t9);
}
@@ -1421,23 +1412,15 @@
}
-void StoreRegistersStateStub::GenerateAheadOfTime(
- Isolate* isolate) {
- StoreRegistersStateStub stub1(isolate, kDontSaveFPRegs);
- stub1.GetCode();
- // Hydrogen code stubs need stub2 at snapshot time.
- StoreRegistersStateStub stub2(isolate, kSaveFPRegs);
- stub2.GetCode();
+void StoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) {
+ StoreRegistersStateStub stub(isolate);
+ stub.GetCode();
}
-void RestoreRegistersStateStub::GenerateAheadOfTime(
- Isolate* isolate) {
- RestoreRegistersStateStub stub1(isolate, kDontSaveFPRegs);
- stub1.GetCode();
- // Hydrogen code stubs need stub2 at snapshot time.
- RestoreRegistersStateStub stub2(isolate, kSaveFPRegs);
- stub2.GetCode();
+void RestoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) {
+ RestoreRegistersStateStub stub(isolate);
+ stub.GetCode();
}
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.h Thu Jul 3 12:27:23
2014 UTC
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.h Tue Jul 22 14:34:55
2014 UTC
@@ -78,28 +78,26 @@
class StoreRegistersStateStub: public PlatformCodeStub {
public:
- explicit StoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode
with_fp)
- : PlatformCodeStub(isolate), save_doubles_(with_fp) {}
+ explicit StoreRegistersStateStub(Isolate* isolate)
+ : PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
private:
Major MajorKey() const { return StoreRegistersState; }
- int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
- SaveFPRegsMode save_doubles_;
+ int MinorKey() const { return 0; }
void Generate(MacroAssembler* masm);
};
class RestoreRegistersStateStub: public PlatformCodeStub {
public:
- explicit RestoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode
with_fp)
- : PlatformCodeStub(isolate), save_doubles_(with_fp) {}
+ explicit RestoreRegistersStateStub(Isolate* isolate)
+ : PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
private:
Major MajorKey() const { return RestoreRegistersState; }
- int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
- SaveFPRegsMode save_doubles_;
+ int MinorKey() const { return 0; }
void Generate(MacroAssembler* masm);
};
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Mon Jul 21
19:09:56 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jul 22
14:34:55 2014 UTC
@@ -1014,15 +1014,6 @@
RecordSafepoint(
pointers, Safepoint::kWithRegisters, arguments, deopt_mode);
}
-
-
-void LCodeGen::RecordSafepointWithRegistersAndDoubles(
- LPointerMap* pointers,
- int arguments,
- Safepoint::DeoptMode deopt_mode) {
- RecordSafepoint(
- pointers, Safepoint::kWithRegistersAndDoubles, arguments,
deopt_mode);
-}
void LCodeGen::RecordAndWritePosition(int position) {
@@ -2803,7 +2794,7 @@
flags | InstanceofStub::kReturnTrueFalseObject);
InstanceofStub stub(isolate(), flags);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
LoadContextFromDeferred(instr->context());
// Get the temp register reserved by the instruction. This needs to be
t0 as
@@ -3654,7 +3645,7 @@
// Input is negative. Reverse its sign.
// Preserve the value of all registers.
{
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
// Registers were saved at the safepoint, so we can use
// many scratch registers.
@@ -4456,13 +4447,12 @@
} else {
ASSERT(object_reg.is(a0));
ASSERT(ToRegister(instr->context()).is(cp));
- PushSafepointRegistersScope scope(
- this, Safepoint::kWithRegistersAndDoubles);
+ PushSafepointRegistersScope scope(this);
__ li(a1, Operand(to_map));
bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
TransitionElementsKindStub stub(isolate(), from_kind, to_kind,
is_js_array);
__ CallStub(&stub);
- RecordSafepointWithRegistersAndDoubles(
+ RecordSafepointWithRegisters(
instr->pointer_map(), 0, Safepoint::kLazyDeopt);
}
__ bind(¬_applicable);
@@ -4525,7 +4515,7 @@
// contained in the register pointer map.
__ mov(result, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ push(string);
// Push the index as a smi. This is safe because of the checks in
// DoStringCharCodeAt above.
@@ -4589,7 +4579,7 @@
// contained in the register pointer map.
__ mov(result, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ SmiTag(char_code);
__ push(char_code);
CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr,
instr->context());
@@ -4722,7 +4712,7 @@
__ mov(dst, zero_reg);
// Preserve the value of all registers.
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
// NumberTagI and NumberTagD use the context from the frame, rather
than
// the environment's HContext or HInlinedContext value.
@@ -4788,7 +4778,7 @@
Register reg = ToRegister(instr->result());
__ mov(reg, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
// NumberTagI and NumberTagD use the context from the frame, rather than
// the environment's HContext or HInlinedContext value.
// They only call Runtime::kAllocateHeapNumber.
@@ -5167,7 +5157,7 @@
void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register
object) {
{
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ push(object);
__ mov(cp, zero_reg);
__ CallRuntimeSaveDoubles(Runtime::kTryMigrateInstance);
@@ -5379,7 +5369,7 @@
// contained in the register pointer map.
__ mov(result, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
if (instr->size()->IsRegister()) {
Register size = ToRegister(instr->size());
ASSERT(!size.is(result));
@@ -5708,7 +5698,7 @@
void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
LoadContextFromDeferred(instr->context());
__ CallRuntimeSaveDoubles(Runtime::kStackGuard);
RecordSafepointWithLazyDeopt(
@@ -5850,7 +5840,7 @@
Register result,
Register object,
Register index) {
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ Push(object, index);
__ mov(cp, zero_reg);
__ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble);
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.h Fri Jun 20
08:40:11 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.h Tue Jul 22
14:34:55 2014 UTC
@@ -269,9 +269,6 @@
void RecordSafepointWithRegisters(LPointerMap* pointers,
int arguments,
Safepoint::DeoptMode mode);
- void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers,
- int arguments,
- Safepoint::DeoptMode mode);
void RecordAndWritePosition(int position) V8_OVERRIDE;
@@ -386,56 +383,24 @@
Safepoint::Kind expected_safepoint_kind_;
- class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
+ class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
public:
- PushSafepointRegistersScope(LCodeGen* codegen,
- Safepoint::Kind kind)
+ explicit PushSafepointRegistersScope(LCodeGen* codegen)
: codegen_(codegen) {
ASSERT(codegen_->info()->is_calling());
ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
- codegen_->expected_safepoint_kind_ = kind;
+ codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
- switch (codegen_->expected_safepoint_kind_) {
- case Safepoint::kWithRegisters: {
- StoreRegistersStateStub stub1(codegen_->masm_->isolate(),
- kDontSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub1);
- break;
- }
- case Safepoint::kWithRegistersAndDoubles: {
- StoreRegistersStateStub stub2(codegen_->masm_->isolate(),
- kSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub2);
- break;
- }
- default:
- UNREACHABLE();
- }
+ StoreRegistersStateStub stub(codegen_->isolate());
+ codegen_->masm_->push(ra);
+ codegen_->masm_->CallStub(&stub);
}
~PushSafepointRegistersScope() {
- Safepoint::Kind kind = codegen_->expected_safepoint_kind_;
- ASSERT((kind & Safepoint::kWithRegisters) != 0);
- switch (kind) {
- case Safepoint::kWithRegisters: {
- RestoreRegistersStateStub stub1(codegen_->masm_->isolate(),
- kDontSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub1);
- break;
- }
- case Safepoint::kWithRegistersAndDoubles: {
- RestoreRegistersStateStub stub2(codegen_->masm_->isolate(),
- kSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub2);
- break;
- }
- default:
- UNREACHABLE();
- }
+ ASSERT(codegen_->expected_safepoint_kind_ ==
Safepoint::kWithRegisters);
+ RestoreRegistersStateStub stub(codegen_->isolate());
+ codegen_->masm_->push(ra);
+ codegen_->masm_->CallStub(&stub);
codegen_->expected_safepoint_kind_ = Safepoint::kSimple;
}
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Tue Jul 15
08:38:16 2014 UTC
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Tue Jul 22
14:34:55 2014 UTC
@@ -116,32 +116,6 @@
Addu(sp, sp, Operand(num_unsaved * kPointerSize));
}
}
-
-
-void MacroAssembler::PushSafepointRegistersAndDoubles() {
- PushSafepointRegisters();
- Subu(sp, sp, Operand(FPURegister::NumAllocatableRegisters() *
kDoubleSize));
- for (int i = 0; i < FPURegister::NumAllocatableRegisters(); i+=2) {
- FPURegister reg = FPURegister::FromAllocationIndex(i);
- sdc1(reg, MemOperand(sp, i * kDoubleSize));
- }
-}
-
-
-void MacroAssembler::PopSafepointRegistersAndDoubles() {
- for (int i = 0; i < FPURegister::NumAllocatableRegisters(); i+=2) {
- FPURegister reg = FPURegister::FromAllocationIndex(i);
- ldc1(reg, MemOperand(sp, i * kDoubleSize));
- }
- Addu(sp, sp, Operand(FPURegister::NumAllocatableRegisters() *
kDoubleSize));
- PopSafepointRegisters();
-}
-
-
-void MacroAssembler::StoreToSafepointRegistersAndDoublesSlot(Register src,
- Register dst)
{
- sw(src, SafepointRegistersAndDoublesSlot(dst));
-}
void MacroAssembler::StoreToSafepointRegisterSlot(Register src, Register
dst) {
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.h Tue Jul 15
08:38:16 2014 UTC
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.h Tue Jul 22
14:34:55 2014 UTC
@@ -711,12 +711,9 @@
// RegList constant kSafepointSavedRegisters.
void PushSafepointRegisters();
void PopSafepointRegisters();
- void PushSafepointRegistersAndDoubles();
- void PopSafepointRegistersAndDoubles();
// Store value in register src in the safepoint stack slot for
// register dst.
void StoreToSafepointRegisterSlot(Register src, Register dst);
- void StoreToSafepointRegistersAndDoublesSlot(Register src, Register dst);
// Load the value of the src register from its safepoint stack slot
// into register dst.
void LoadFromSafepointRegisterSlot(Register dst, Register src);
=======================================
--- /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Thu Jul 17
18:24:59 2014 UTC
+++ /branches/bleeding_edge/src/mips64/code-stubs-mips64.cc Tue Jul 22
14:34:55 2014 UTC
@@ -1133,11 +1133,7 @@
void StoreRegistersStateStub::Generate(MacroAssembler* masm) {
__ mov(t9, ra);
__ pop(ra);
- if (save_doubles_ == kSaveFPRegs) {
- __ PushSafepointRegistersAndDoubles();
- } else {
- __ PushSafepointRegisters();
- }
+ __ PushSafepointRegisters();
__ Jump(t9);
}
@@ -1145,11 +1141,7 @@
void RestoreRegistersStateStub::Generate(MacroAssembler* masm) {
__ mov(t9, ra);
__ pop(ra);
- if (save_doubles_ == kSaveFPRegs) {
- __ PopSafepointRegistersAndDoubles();
- } else {
- __ PopSafepointRegisters();
- }
+ __ PopSafepointRegisters();
__ Jump(t9);
}
@@ -1415,23 +1407,15 @@
}
-void StoreRegistersStateStub::GenerateAheadOfTime(
- Isolate* isolate) {
- StoreRegistersStateStub stub1(isolate, kDontSaveFPRegs);
- stub1.GetCode();
- // Hydrogen code stubs need stub2 at snapshot time.
- StoreRegistersStateStub stub2(isolate, kSaveFPRegs);
- stub2.GetCode();
+void StoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) {
+ StoreRegistersStateStub stub(isolate);
+ stub.GetCode();
}
-void RestoreRegistersStateStub::GenerateAheadOfTime(
- Isolate* isolate) {
- RestoreRegistersStateStub stub1(isolate, kDontSaveFPRegs);
- stub1.GetCode();
- // Hydrogen code stubs need stub2 at snapshot time.
- RestoreRegistersStateStub stub2(isolate, kSaveFPRegs);
- stub2.GetCode();
+void RestoreRegistersStateStub::GenerateAheadOfTime(Isolate* isolate) {
+ RestoreRegistersStateStub stub(isolate);
+ stub.GetCode();
}
=======================================
--- /branches/bleeding_edge/src/mips64/code-stubs-mips64.h Wed Jul 9
11:08:26 2014 UTC
+++ /branches/bleeding_edge/src/mips64/code-stubs-mips64.h Tue Jul 22
14:34:55 2014 UTC
@@ -77,28 +77,26 @@
class StoreRegistersStateStub: public PlatformCodeStub {
public:
- explicit StoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode
with_fp)
- : PlatformCodeStub(isolate), save_doubles_(with_fp) {}
+ explicit StoreRegistersStateStub(Isolate* isolate)
+ : PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
private:
Major MajorKey() const { return StoreRegistersState; }
- int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
- SaveFPRegsMode save_doubles_;
+ int MinorKey() const { return 0; }
void Generate(MacroAssembler* masm);
};
class RestoreRegistersStateStub: public PlatformCodeStub {
public:
- explicit RestoreRegistersStateStub(Isolate* isolate, SaveFPRegsMode
with_fp)
- : PlatformCodeStub(isolate), save_doubles_(with_fp) {}
+ explicit RestoreRegistersStateStub(Isolate* isolate)
+ : PlatformCodeStub(isolate) {}
static void GenerateAheadOfTime(Isolate* isolate);
private:
Major MajorKey() const { return RestoreRegistersState; }
- int MinorKey() const { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
- SaveFPRegsMode save_doubles_;
+ int MinorKey() const { return 0; }
void Generate(MacroAssembler* masm);
};
=======================================
--- /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Mon Jul 21
19:09:56 2014 UTC
+++ /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Tue Jul 22
14:34:55 2014 UTC
@@ -969,15 +969,6 @@
RecordSafepoint(
pointers, Safepoint::kWithRegisters, arguments, deopt_mode);
}
-
-
-void LCodeGen::RecordSafepointWithRegistersAndDoubles(
- LPointerMap* pointers,
- int arguments,
- Safepoint::DeoptMode deopt_mode) {
- RecordSafepoint(
- pointers, Safepoint::kWithRegistersAndDoubles, arguments,
deopt_mode);
-}
void LCodeGen::RecordAndWritePosition(int position) {
@@ -2771,7 +2762,7 @@
flags | InstanceofStub::kReturnTrueFalseObject);
InstanceofStub stub(isolate(), flags);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
LoadContextFromDeferred(instr->context());
// Get the temp register reserved by the instruction. This needs to be
a4 as
@@ -3681,7 +3672,7 @@
// Input is negative. Reverse its sign.
// Preserve the value of all registers.
{
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
// Registers were saved at the safepoint, so we can use
// many scratch registers.
@@ -4518,13 +4509,12 @@
} else {
ASSERT(object_reg.is(a0));
ASSERT(ToRegister(instr->context()).is(cp));
- PushSafepointRegistersScope scope(
- this, Safepoint::kWithRegistersAndDoubles);
+ PushSafepointRegistersScope scope(this);
__ li(a1, Operand(to_map));
bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
TransitionElementsKindStub stub(isolate(), from_kind, to_kind,
is_js_array);
__ CallStub(&stub);
- RecordSafepointWithRegistersAndDoubles(
+ RecordSafepointWithRegisters(
instr->pointer_map(), 0, Safepoint::kLazyDeopt);
}
__ bind(¬_applicable);
@@ -4587,7 +4577,7 @@
// contained in the register pointer map.
__ mov(result, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ push(string);
// Push the index as a smi. This is safe because of the checks in
// DoStringCharCodeAt above.
@@ -4651,7 +4641,7 @@
// contained in the register pointer map.
__ mov(result, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ SmiTag(char_code);
__ push(char_code);
CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr,
instr->context());
@@ -4755,7 +4745,7 @@
// contains an integer value.
__ mov(dst, zero_reg);
// Preserve the value of all registers.
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
// NumberTagI and NumberTagD use the context from the frame, rather
than
// the environment's HContext or HInlinedContext value.
@@ -4818,7 +4808,7 @@
Register reg = ToRegister(instr->result());
__ mov(reg, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
// NumberTagI and NumberTagD use the context from the frame, rather than
// the environment's HContext or HInlinedContext value.
// They only call Runtime::kAllocateHeapNumber.
@@ -5196,7 +5186,7 @@
void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register
object) {
{
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ push(object);
__ mov(cp, zero_reg);
__ CallRuntimeSaveDoubles(Runtime::kTryMigrateInstance);
@@ -5408,7 +5398,7 @@
// contained in the register pointer map.
__ mov(result, zero_reg);
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
if (instr->size()->IsRegister()) {
Register size = ToRegister(instr->size());
ASSERT(!size.is(result));
@@ -5739,7 +5729,7 @@
void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
LoadContextFromDeferred(instr->context());
__ CallRuntimeSaveDoubles(Runtime::kStackGuard);
RecordSafepointWithLazyDeopt(
@@ -5881,7 +5871,7 @@
Register result,
Register object,
Register index) {
- PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
+ PushSafepointRegistersScope scope(this);
__ Push(object, index);
__ mov(cp, zero_reg);
__ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble);
=======================================
--- /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.h Wed Jul 9
11:08:26 2014 UTC
+++ /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.h Tue Jul 22
14:34:55 2014 UTC
@@ -270,9 +270,6 @@
void RecordSafepointWithRegisters(LPointerMap* pointers,
int arguments,
Safepoint::DeoptMode mode);
- void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers,
- int arguments,
- Safepoint::DeoptMode mode);
void RecordAndWritePosition(int position) V8_OVERRIDE;
@@ -387,56 +384,24 @@
Safepoint::Kind expected_safepoint_kind_;
- class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
+ class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
public:
- PushSafepointRegistersScope(LCodeGen* codegen,
- Safepoint::Kind kind)
+ explicit PushSafepointRegistersScope(LCodeGen* codegen)
: codegen_(codegen) {
ASSERT(codegen_->info()->is_calling());
ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
- codegen_->expected_safepoint_kind_ = kind;
+ codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
- switch (codegen_->expected_safepoint_kind_) {
- case Safepoint::kWithRegisters: {
- StoreRegistersStateStub stub1(codegen_->masm_->isolate(),
- kDontSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub1);
- break;
- }
- case Safepoint::kWithRegistersAndDoubles: {
- StoreRegistersStateStub stub2(codegen_->masm_->isolate(),
- kSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub2);
- break;
- }
- default:
- UNREACHABLE();
- }
+ StoreRegistersStateStub stub(codegen_->isolate());
+ codegen_->masm_->push(ra);
+ codegen_->masm_->CallStub(&stub);
}
~PushSafepointRegistersScope() {
- Safepoint::Kind kind = codegen_->expected_safepoint_kind_;
- ASSERT((kind & Safepoint::kWithRegisters) != 0);
- switch (kind) {
- case Safepoint::kWithRegisters: {
- RestoreRegistersStateStub stub1(codegen_->masm_->isolate(),
- kDontSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub1);
- break;
- }
- case Safepoint::kWithRegistersAndDoubles: {
- RestoreRegistersStateStub stub2(codegen_->masm_->isolate(),
- kSaveFPRegs);
- codegen_->masm_->push(ra);
- codegen_->masm_->CallStub(&stub2);
- break;
- }
- default:
- UNREACHABLE();
- }
+ ASSERT(codegen_->expected_safepoint_kind_ ==
Safepoint::kWithRegisters);
+ RestoreRegistersStateStub stub(codegen_->isolate());
+ codegen_->masm_->push(ra);
+ codegen_->masm_->CallStub(&stub);
codegen_->expected_safepoint_kind_ = Safepoint::kSimple;
}
=======================================
--- /branches/bleeding_edge/src/mips64/macro-assembler-mips64.cc Tue Jul 15
16:57:04 2014 UTC
+++ /branches/bleeding_edge/src/mips64/macro-assembler-mips64.cc Tue Jul 22
14:34:55 2014 UTC
@@ -120,32 +120,6 @@
Daddu(sp, sp, Operand(num_unsaved * kPointerSize));
}
}
-
-
-void MacroAssembler::PushSafepointRegistersAndDoubles() {
- PushSafepointRegisters();
- Dsubu(sp, sp, Operand(FPURegister::NumAllocatableRegisters() *
kDoubleSize));
- for (int i = 0; i < FPURegister::NumAllocatableRegisters(); i++) {
- FPURegister reg = FPURegister::FromAllocationIndex(i);
- sdc1(reg, MemOperand(sp, i * kDoubleSize));
- }
-}
-
-
-void MacroAssembler::PopSafepointRegistersAndDoubles() {
- for (int i = 0; i < FPURegister::NumAllocatableRegisters(); i++) {
- FPURegister reg = FPURegister::FromAllocationIndex(i);
- ldc1(reg, MemOperand(sp, i * kDoubleSize));
- }
- Daddu(sp, sp, Operand(FPURegister::NumAllocatableRegisters() *
kDoubleSize));
- PopSafepointRegisters();
-}
-
-
-void MacroAssembler::StoreToSafepointRegistersAndDoublesSlot(Register src,
- Register dst)
{
- sd(src, SafepointRegistersAndDoublesSlot(dst));
-}
void MacroAssembler::StoreToSafepointRegisterSlot(Register src, Register
dst) {
=======================================
--- /branches/bleeding_edge/src/mips64/macro-assembler-mips64.h Tue Jul 15
16:57:04 2014 UTC
+++ /branches/bleeding_edge/src/mips64/macro-assembler-mips64.h Tue Jul 22
14:34:55 2014 UTC
@@ -746,12 +746,9 @@
// RegList constant kSafepointSavedRegisters.
void PushSafepointRegisters();
void PopSafepointRegisters();
- void PushSafepointRegistersAndDoubles();
- void PopSafepointRegistersAndDoubles();
// Store value in register src in the safepoint stack slot for
// register dst.
void StoreToSafepointRegisterSlot(Register src, Register dst);
- void StoreToSafepointRegistersAndDoublesSlot(Register src, Register dst);
// Load the value of the src register from its safepoint stack slot
// into register dst.
void LoadFromSafepointRegisterSlot(Register dst, Register src);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.