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

Unified Diff: src/mips64/constants-mips64.h

Issue 2374013004: MIPS32: Remove EXTRA, NORMAL instruction type check. (Closed)
Patch Set: Fix indentation. Created 4 years, 3 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/mips/simulator-mips.h ('k') | src/mips64/disasm-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/constants-mips64.h
diff --git a/src/mips64/constants-mips64.h b/src/mips64/constants-mips64.h
index 2d78d2947f6eb37111a4772551617b6ce8ab0a4f..f96ea2340e81f57ea8ebd8121a36d8809218c43e 100644
--- a/src/mips64/constants-mips64.h
+++ b/src/mips64/constants-mips64.h
@@ -932,8 +932,6 @@ class InstructionBase {
return (InstructionBits() >> lo) & ((2U << (hi - lo)) - 1);
}
- enum TypeChecks { NORMAL, EXTRA };
-
static constexpr uint64_t kOpcodeImmediateTypeMask =
OpcodeToBitNumber(REGIMM) | OpcodeToBitNumber(BEQ) |
OpcodeToBitNumber(BNE) | OpcodeToBitNumber(BLEZ) |
@@ -1014,7 +1012,7 @@ class InstructionBase {
inline int SaFieldRaw() const { return InstructionBits() & kSaFieldMask; }
// Get the encoding type of the instruction.
- inline Type InstructionType(TypeChecks checks = NORMAL) const;
+ inline Type InstructionType() const;
protected:
InstructionBase() {}
@@ -1226,26 +1224,14 @@ const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2;
const int kInvalidStackOffset = -1;
const int kBranchReturnOffset = 2 * Instruction::kInstrSize;
-InstructionBase::Type InstructionBase::InstructionType(
- TypeChecks checks) const {
- if (checks == EXTRA) {
- if (OpcodeToBitNumber(OpcodeFieldRaw()) & kOpcodeImmediateTypeMask) {
- return kImmediateType;
- }
- }
+InstructionBase::Type InstructionBase::InstructionType() const {
switch (OpcodeFieldRaw()) {
case SPECIAL:
- if (checks == EXTRA) {
- if (FunctionFieldToBitNumber(FunctionFieldRaw()) &
- kFunctionFieldRegisterTypeMask) {
- return kRegisterType;
- } else {
- return kUnsupported;
- }
- } else {
+ if (FunctionFieldToBitNumber(FunctionFieldRaw()) &
+ kFunctionFieldRegisterTypeMask) {
return kRegisterType;
}
- break;
+ return kUnsupported;
case SPECIAL2:
switch (FunctionFieldRaw()) {
case MUL:
@@ -1322,11 +1308,7 @@ InstructionBase::Type InstructionBase::InstructionType(
return kJumpType;
default:
- if (checks == NORMAL) {
- return kImmediateType;
- } else {
- return kUnsupported;
- }
+ return kImmediateType;
}
return kUnsupported;
}
« no previous file with comments | « src/mips/simulator-mips.h ('k') | src/mips64/disasm-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698