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

Unified Diff: src/mips64/lithium-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-mips64.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/lithium-mips64.cc
diff --git a/src/mips/lithium-mips.cc b/src/mips64/lithium-mips64.cc
similarity index 99%
copy from src/mips/lithium-mips.cc
copy to src/mips64/lithium-mips64.cc
index f264f6248ec7f4fe13ce40ad326d94c9d5d9c0db..dd1c6ca2b156f3a12dbe834677eb53373540d774 100644
--- a/src/mips/lithium-mips.cc
+++ b/src/mips64/lithium-mips64.cc
@@ -6,8 +6,8 @@
#include "src/hydrogen-osr.h"
#include "src/lithium-allocator-inl.h"
-#include "src/mips/lithium-codegen-mips.h"
-#include "src/mips/lithium-mips.h"
+#include "src/mips64/lithium-codegen-mips64.h"
+#include "src/mips64/lithium-mips64.h"
namespace v8 {
namespace internal {
@@ -997,7 +997,7 @@ LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
new(zone()) LInstanceOfKnownGlobal(
UseFixed(instr->context(), cp),
UseFixed(instr->left(), a0),
- FixedTemp(t0));
+ FixedTemp(a4));
return MarkAsCall(DefineFixed(result, v0), instr);
}
@@ -1277,7 +1277,7 @@ LInstruction* LChunkBuilder::DoDivByPowerOf2I(HDiv* instr) {
if ((instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) ||
(instr->CheckFlag(HValue::kCanOverflow) && divisor == -1) ||
(!instr->CheckFlag(HInstruction::kAllUsesTruncatingToInt32) &&
- divisor != 1 && divisor != -1)) {
+ divisor != 1 && divisor != -1)) {
result = AssignEnvironment(result);
}
return result;
@@ -1492,7 +1492,7 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) {
return DefineAsRegister(mul);
} else if (instr->representation().IsDouble()) {
- if (kArchVariant == kMips32r2) {
+ if (kArchVariant == kMips64r2) {
if (instr->HasOneUse() && instr->uses().value()->IsAdd()) {
HAdd* add = HAdd::cast(instr->uses().value());
if (instr == add->left()) {
@@ -1565,7 +1565,7 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
LInstruction* result = DefineAsRegister(add);
return result;
} else if (instr->representation().IsDouble()) {
- if (kArchVariant == kMips32r2) {
+ if (kArchVariant == kMips64r2) {
if (instr->left()->IsMul())
return DoMultiplyAdd(HMul::cast(instr->left()), instr->right());
@@ -1789,7 +1789,7 @@ LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
if (!FLAG_debug_code || !instr->skip_check()) {
result = AssignEnvironment(result);
}
- return result;
+return result;
}
@@ -1864,6 +1864,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
LOperand* value = UseRegister(val);
LOperand* temp1 = TempRegister();
LOperand* temp2 = TempRegister();
+
LUnallocated* result_temp = TempRegister();
LNumberTagD* result = new(zone()) LNumberTagD(value, temp1, temp2);
return AssignPointerMap(Define(result, result_temp));
@@ -1881,21 +1882,17 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
} else if (from.IsInteger32()) {
info()->MarkAsDeferredCalling();
if (to.IsTagged()) {
- if (!instr->CheckFlag(HValue::kCanOverflow)) {
- LOperand* value = UseRegisterAtStart(val);
- return DefineAsRegister(new(zone()) LSmiTag(value));
- } else if (val->CheckFlag(HInstruction::kUint32)) {
+ if (val->CheckFlag(HInstruction::kUint32)) {
LOperand* value = UseRegisterAtStart(val);
LOperand* temp1 = TempRegister();
LOperand* temp2 = TempRegister();
LNumberTagU* result = new(zone()) LNumberTagU(value, temp1, temp2);
return AssignPointerMap(DefineAsRegister(result));
} else {
+ STATIC_ASSERT((kMinInt == Smi::kMinValue) &&
+ (kMaxInt == Smi::kMaxValue));
LOperand* value = UseRegisterAtStart(val);
- LOperand* temp1 = TempRegister();
- LOperand* temp2 = TempRegister();
- LNumberTagI* result = new(zone()) LNumberTagI(value, temp1, temp2);
- return AssignPointerMap(DefineAsRegister(result));
+ return DefineAsRegister(new(zone()) LSmiTag(value));
}
} else if (to.IsSmi()) {
LOperand* value = UseRegister(val);
@@ -2116,7 +2113,8 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
if (instr->representation().IsDouble()) {
obj = UseRegister(instr->elements());
} else {
- ASSERT(instr->representation().IsSmiOrTagged());
+ ASSERT(instr->representation().IsSmiOrTagged() ||
+ instr->representation().IsInteger32());
obj = UseRegisterAtStart(instr->elements());
}
result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key));
@@ -2168,7 +2166,8 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
key = UseRegisterOrConstantAtStart(instr->key());
val = UseRegister(instr->value());
} else {
- ASSERT(instr->value()->representation().IsSmiOrTagged());
+ ASSERT(instr->value()->representation().IsSmiOrTagged() ||
+ instr->value()->representation().IsInteger32());
if (needs_write_barrier) {
object = UseTempRegister(instr->elements());
val = UseTempRegister(instr->value());
@@ -2526,7 +2525,6 @@ LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
}
-
LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
LOperand* context = UseRegisterAtStart(instr->context());
return new(zone()) LStoreFrameContext(context);
@@ -2542,4 +2540,5 @@ LInstruction* LChunkBuilder::DoAllocateBlockContext(
return MarkAsCall(DefineFixed(result, cp), instr);
}
+
} } // namespace v8::internal
« no previous file with comments | « src/mips64/lithium-mips64.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698