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

Unified Diff: src/compiler/instruction.h

Issue 2017733002: Turbofan: Rename UnallocatedOperand policies from '*DOUBLE*' to '*FP*'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 7 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 | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 15adaaac7c65e1d44b0b48ea4d829a677c566175..4630557c7a2c4521b124cbd93fd06916d051671e 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -155,7 +155,7 @@ class UnallocatedOperand : public InstructionOperand {
NONE,
ANY,
FIXED_REGISTER,
- FIXED_DOUBLE_REGISTER,
+ FIXED_FP_REGISTER,
MUST_HAVE_REGISTER,
MUST_HAVE_SLOT,
SAME_AS_FIRST_INPUT
@@ -192,7 +192,7 @@ class UnallocatedOperand : public InstructionOperand {
UnallocatedOperand(ExtendedPolicy policy, int index, int virtual_register)
: UnallocatedOperand(virtual_register) {
- DCHECK(policy == FIXED_REGISTER || policy == FIXED_DOUBLE_REGISTER);
+ DCHECK(policy == FIXED_REGISTER || policy == FIXED_FP_REGISTER);
value_ |= BasicPolicyField::encode(EXTENDED_POLICY);
value_ |= ExtendedPolicyField::encode(policy);
value_ |= LifetimeField::encode(USED_AT_END);
@@ -220,7 +220,7 @@ class UnallocatedOperand : public InstructionOperand {
bool HasFixedPolicy() const {
return basic_policy() == FIXED_SLOT ||
extended_policy() == FIXED_REGISTER ||
- extended_policy() == FIXED_DOUBLE_REGISTER;
+ extended_policy() == FIXED_FP_REGISTER;
}
bool HasRegisterPolicy() const {
return basic_policy() == EXTENDED_POLICY &&
@@ -239,9 +239,9 @@ class UnallocatedOperand : public InstructionOperand {
return basic_policy() == EXTENDED_POLICY &&
extended_policy() == FIXED_REGISTER;
}
- bool HasFixedDoubleRegisterPolicy() const {
+ bool HasFixedFPRegisterPolicy() const {
return basic_policy() == EXTENDED_POLICY &&
- extended_policy() == FIXED_DOUBLE_REGISTER;
+ extended_policy() == FIXED_FP_REGISTER;
}
bool HasSecondaryStorage() const {
return basic_policy() == EXTENDED_POLICY &&
@@ -272,9 +272,9 @@ class UnallocatedOperand : public InstructionOperand {
FixedSlotIndexField::kShift);
}
- // [fixed_register_index]: Only for FIXED_REGISTER or FIXED_DOUBLE_REGISTER.
+ // [fixed_register_index]: Only for FIXED_REGISTER or FIXED_FP_REGISTER.
int fixed_register_index() const {
- DCHECK(HasFixedRegisterPolicy() || HasFixedDoubleRegisterPolicy());
+ DCHECK(HasFixedRegisterPolicy() || HasFixedFPRegisterPolicy());
return FixedRegisterField::decode(value_);
}
@@ -421,30 +421,31 @@ class LocationOperand : public InstructionOperand {
return static_cast<int64_t>(value_) >> IndexField::kShift;
}
+ int register_code() const {
+ DCHECK(IsRegister() || IsFPRegister());
+ return static_cast<int64_t>(value_) >> IndexField::kShift;
+ }
+
Register GetRegister() const {
DCHECK(IsRegister());
- return Register::from_code(static_cast<int64_t>(value_) >>
- IndexField::kShift);
+ return Register::from_code(register_code());
}
FloatRegister GetFloatRegister() const {
DCHECK(IsFloatRegister());
- return FloatRegister::from_code(static_cast<int64_t>(value_) >>
- IndexField::kShift);
+ return FloatRegister::from_code(register_code());
}
DoubleRegister GetDoubleRegister() const {
// TODO(bbudge) Tighten this test to IsDoubleRegister when all code
// generators are changed to use the correct Get*Register method.
DCHECK(IsFPRegister());
- return DoubleRegister::from_code(static_cast<int64_t>(value_) >>
- IndexField::kShift);
+ return DoubleRegister::from_code(register_code());
}
Simd128Register GetSimd128Register() const {
DCHECK(IsSimd128Register());
- return Simd128Register::from_code(static_cast<int64_t>(value_) >>
- IndexField::kShift);
+ return Simd128Register::from_code(register_code());
}
LocationKind location_kind() const {
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698