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

Unified Diff: src/mips64/lithium-gap-resolver-mips64.cc

Issue 371923006: Add mips64 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 5 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/mips64/lithium-gap-resolver-mips64.h ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/lithium-gap-resolver-mips64.cc
diff --git a/src/mips/lithium-gap-resolver-mips.cc b/src/mips64/lithium-gap-resolver-mips64.cc
similarity index 87%
copy from src/mips/lithium-gap-resolver-mips.cc
copy to src/mips64/lithium-gap-resolver-mips64.cc
index aa77b94685e696f4ff82bafa95c4e5304b778428..aa1c28c4de3356136685ddad2828a3ef273589be 100644
--- a/src/mips/lithium-gap-resolver-mips.cc
+++ b/src/mips64/lithium-gap-resolver-mips64.cc
@@ -4,8 +4,8 @@
#include "src/v8.h"
-#include "src/mips/lithium-codegen-mips.h"
-#include "src/mips/lithium-gap-resolver-mips.h"
+#include "src/mips64/lithium-codegen-mips64.h"
+#include "src/mips64/lithium-gap-resolver-mips64.h"
namespace v8 {
namespace internal {
@@ -147,7 +147,7 @@ void LGapResolver::BreakCycle(int index) {
if (source->IsRegister()) {
__ mov(kLithiumScratchReg, cgen_->ToRegister(source));
} else if (source->IsStackSlot()) {
- __ lw(kLithiumScratchReg, cgen_->ToMemOperand(source));
+ __ ld(kLithiumScratchReg, cgen_->ToMemOperand(source));
} else if (source->IsDoubleRegister()) {
__ mov_d(kLithiumScratchDouble, cgen_->ToDoubleRegister(source));
} else if (source->IsDoubleStackSlot()) {
@@ -168,7 +168,7 @@ void LGapResolver::RestoreValue() {
if (saved_destination_->IsRegister()) {
__ mov(cgen_->ToRegister(saved_destination_), kLithiumScratchReg);
} else if (saved_destination_->IsStackSlot()) {
- __ sw(kLithiumScratchReg, cgen_->ToMemOperand(saved_destination_));
+ __ sd(kLithiumScratchReg, cgen_->ToMemOperand(saved_destination_));
} else if (saved_destination_->IsDoubleRegister()) {
__ mov_d(cgen_->ToDoubleRegister(saved_destination_),
kLithiumScratchDouble);
@@ -197,12 +197,12 @@ void LGapResolver::EmitMove(int index) {
__ mov(cgen_->ToRegister(destination), source_register);
} else {
ASSERT(destination->IsStackSlot());
- __ sw(source_register, cgen_->ToMemOperand(destination));
+ __ sd(source_register, cgen_->ToMemOperand(destination));
}
} else if (source->IsStackSlot()) {
MemOperand source_operand = cgen_->ToMemOperand(source);
if (destination->IsRegister()) {
- __ lw(cgen_->ToRegister(destination), source_operand);
+ __ ld(cgen_->ToRegister(destination), source_operand);
} else {
ASSERT(destination->IsStackSlot());
MemOperand destination_operand = cgen_->ToMemOperand(destination);
@@ -212,15 +212,15 @@ void LGapResolver::EmitMove(int index) {
// Therefore we can't use 'at'. It is OK if the read from the source
// destroys 'at', since that happens before the value is read.
// This uses only a single reg of the double reg-pair.
- __ lwc1(kLithiumScratchDouble, source_operand);
- __ swc1(kLithiumScratchDouble, destination_operand);
+ __ ldc1(kLithiumScratchDouble, source_operand);
+ __ sdc1(kLithiumScratchDouble, destination_operand);
} else {
- __ lw(at, source_operand);
- __ sw(at, destination_operand);
+ __ ld(at, source_operand);
+ __ sd(at, destination_operand);
}
} else {
- __ lw(kLithiumScratchReg, source_operand);
- __ sw(kLithiumScratchReg, destination_operand);
+ __ ld(kLithiumScratchReg, source_operand);
+ __ sd(kLithiumScratchReg, destination_operand);
}
}
@@ -228,12 +228,12 @@ void LGapResolver::EmitMove(int index) {
LConstantOperand* constant_source = LConstantOperand::cast(source);
if (destination->IsRegister()) {
Register dst = cgen_->ToRegister(destination);
- Representation r = cgen_->IsSmi(constant_source)
- ? Representation::Smi() : Representation::Integer32();
- if (cgen_->IsInteger32(constant_source)) {
- __ li(dst, Operand(cgen_->ToRepresentation(constant_source, r)));
+ if (cgen_->IsSmi(constant_source)) {
+ __ li(dst, Operand(cgen_->ToSmi(constant_source)));
+ } else if (cgen_->IsInteger32(constant_source)) {
+ __ li(dst, Operand(cgen_->ToInteger32(constant_source)));
} else {
- __ li(dst, cgen_->ToHandle(constant_source));
+ __ li(dst, cgen_->ToHandle(constant_source));
}
} else if (destination->IsDoubleRegister()) {
DoubleRegister result = cgen_->ToDoubleRegister(destination);
@@ -242,15 +242,16 @@ void LGapResolver::EmitMove(int index) {
} else {
ASSERT(destination->IsStackSlot());
ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone.
- Representation r = cgen_->IsSmi(constant_source)
- ? Representation::Smi() : Representation::Integer32();
- if (cgen_->IsInteger32(constant_source)) {
- __ li(kLithiumScratchReg,
- Operand(cgen_->ToRepresentation(constant_source, r)));
+ if (cgen_->IsSmi(constant_source)) {
+ __ li(kLithiumScratchReg, Operand(cgen_->ToSmi(constant_source)));
+ __ sd(kLithiumScratchReg, cgen_->ToMemOperand(destination));
+ } else if (cgen_->IsInteger32(constant_source)) {
+ __ li(kLithiumScratchReg, Operand(cgen_->ToInteger32(constant_source)));
+ __ sd(kLithiumScratchReg, cgen_->ToMemOperand(destination));
} else {
__ li(kLithiumScratchReg, cgen_->ToHandle(constant_source));
+ __ sd(kLithiumScratchReg, cgen_->ToMemOperand(destination));
}
- __ sw(kLithiumScratchReg, cgen_->ToMemOperand(destination));
}
} else if (source->IsDoubleRegister()) {
« no previous file with comments | « src/mips64/lithium-gap-resolver-mips64.h ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698