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

Unified Diff: test/cctest/compiler/test-gap-resolver.cc

Issue 1389373002: [turbofan] Create ExplicitOperands to specify operands without virtual registers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 2 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
Index: test/cctest/compiler/test-gap-resolver.cc
diff --git a/test/cctest/compiler/test-gap-resolver.cc b/test/cctest/compiler/test-gap-resolver.cc
index 7dade3df33a5d821a71f6a2acab2d57e37149f1b..b5feb1d461e3de3ead7b1b6869f3f26db4b7997d 100644
--- a/test/cctest/compiler/test-gap-resolver.cc
+++ b/test/cctest/compiler/test-gap-resolver.cc
@@ -32,13 +32,17 @@ class InterpreterState {
private:
struct Key {
bool is_constant;
- AllocatedOperand::AllocatedKind kind;
+ bool is_float;
+ AllocatedOperand::LocationKind kind;
int index;
bool operator<(const Key& other) const {
if (this->is_constant != other.is_constant) {
return this->is_constant;
}
+ if (this->is_float != other.is_float) {
+ return this->is_float;
+ }
if (this->kind != other.kind) {
return this->kind < other.kind;
}
@@ -70,22 +74,24 @@ class InterpreterState {
static Key KeyFor(const InstructionOperand& op) {
bool is_constant = op.IsConstant();
- AllocatedOperand::AllocatedKind kind;
+ bool is_float = false;
+ AllocatedOperand::LocationKind kind;
int index;
if (!is_constant) {
if (op.IsRegister()) {
- index = AllocatedOperand::cast(op).GetRegister().code();
+ index = LocationOperand::cast(op).GetRegister().code();
} else if (op.IsDoubleRegister()) {
- index = AllocatedOperand::cast(op).GetDoubleRegister().code();
+ index = LocationOperand::cast(op).GetDoubleRegister().code();
} else {
- index = AllocatedOperand::cast(op).index();
+ index = LocationOperand::cast(op).index();
}
- kind = AllocatedOperand::cast(op).allocated_kind();
+ is_float = IsFloatingPoint(AllocatedOperand::cast(op).machine_type());
+ kind = AllocatedOperand::cast(op).location_kind();
} else {
index = ConstantOperand::cast(op).virtual_register();
kind = AllocatedOperand::REGISTER;
}
- Key key = {is_constant, kind, index};
+ Key key = {is_constant, is_float, kind, index};
return key;
}
@@ -194,13 +200,16 @@ class ParallelMoveCreator : public HandleAndZoneScope {
// destination can't be Constant.
switch (rng_->NextInt(is_source ? 5 : 4)) {
case 0:
- return StackSlotOperand(RandomType(), index);
+ return AllocatedOperand(LocationOperand::STACK_SLOT, RandomType(),
+ index);
case 1:
- return DoubleStackSlotOperand(RandomDoubleType(), index);
+ return AllocatedOperand(LocationOperand::STACK_SLOT, RandomDoubleType(),
+ index);
case 2:
- return RegisterOperand(RandomType(), index);
+ return AllocatedOperand(LocationOperand::REGISTER, RandomType(), index);
case 3:
- return DoubleRegisterOperand(RandomDoubleType(), index);
+ return AllocatedOperand(LocationOperand::REGISTER, RandomDoubleType(),
+ index);
case 4:
return ConstantOperand(index);
}

Powered by Google App Engine
This is Rietveld 408576698