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

Unified Diff: src/mips/assembler-mips.cc

Issue 1059433003: MIPS: Remove unused J(Label *). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix a nit Created 5 years, 9 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/assembler-mips.h ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/assembler-mips.cc
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc
index 96373579d8e098df42c9950aff67f02a1a343e0e..1955d5349a89589d9e84850380aedfc7211159a9 100644
--- a/src/mips/assembler-mips.cc
+++ b/src/mips/assembler-mips.cc
@@ -663,7 +663,7 @@ int Assembler::target_at(int pos, bool is_internal) {
}
}
// Check we have a branch or jump instruction.
- DCHECK(IsBranch(instr) || IsJ(instr) || IsLui(instr));
+ DCHECK(IsBranch(instr) || IsLui(instr));
// Do NOT change this to <<2. We rely on arithmetic shifts here, assuming
// the compiler uses arithmectic shifts for signed integers.
if (IsBranch(instr)) {
@@ -692,17 +692,8 @@ int Assembler::target_at(int pos, bool is_internal) {
return pos - delta;
}
} else {
- int32_t imm28 = (instr & static_cast<int32_t>(kImm26Mask)) << 2;
- if (imm28 == kEndOfJumpChain) {
- // EndOfChain sentinel is returned directly, not relative to pc or pos.
- return kEndOfChain;
- } else {
- uint32_t instr_address = reinterpret_cast<int32_t>(buffer_ + pos);
- instr_address &= kImm28Mask;
- int delta = static_cast<int>(instr_address - imm28);
- DCHECK(pos > delta);
- return pos - delta;
- }
+ UNREACHABLE();
+ return 0;
}
}
@@ -724,7 +715,7 @@ void Assembler::target_at_put(int32_t pos, int32_t target_pos,
return;
}
- DCHECK(IsBranch(instr) || IsJ(instr) || IsLui(instr));
+ DCHECK(IsBranch(instr) || IsLui(instr));
if (IsBranch(instr)) {
int32_t imm18 = target_pos - (pos + kBranchPCOffset);
DCHECK((imm18 & 3) == 0);
@@ -749,15 +740,7 @@ void Assembler::target_at_put(int32_t pos, int32_t target_pos,
instr_at_put(pos + 1 * Assembler::kInstrSize,
instr_ori | (imm & kImm16Mask));
} else {
- uint32_t imm28 = reinterpret_cast<uint32_t>(buffer_) + target_pos;
- imm28 &= kImm28Mask;
- DCHECK((imm28 & 3) == 0);
-
- instr &= ~kImm26Mask;
- uint32_t imm26 = imm28 >> 2;
- DCHECK(is_uint26(imm26));
-
- instr_at_put(pos, instr | (imm26 & kImm26Mask));
+ UNREACHABLE();
}
}
@@ -2418,21 +2401,6 @@ int Assembler::RelocateInternalReference(RelocInfo::Mode rmode, byte* pc,
instr_at_put(pc + 1 * Assembler::kInstrSize,
instr_ori | (imm & kImm16Mask));
return 2; // Number of instructions patched.
- } else if (IsJ(instr)) {
- uint32_t imm28 = (instr & static_cast<int32_t>(kImm26Mask)) << 2;
- if (static_cast<int32_t>(imm28) == kEndOfJumpChain) {
- return 0; // Number of instructions patched.
- }
- imm28 += pc_delta;
- imm28 &= kImm28Mask;
- DCHECK((imm28 & 3) == 0);
-
- instr &= ~kImm26Mask;
- uint32_t imm26 = imm28 >> 2;
- DCHECK(is_uint26(imm26));
-
- instr_at_put(pc, instr | (imm26 & kImm26Mask));
- return 1; // Number of instructions patched.
} else {
UNREACHABLE();
return 0;
@@ -2759,7 +2727,7 @@ void Assembler::set_target_address_at(Address pc,
}
-void Assembler::JumpLabelToJumpRegister(Address pc) {
+void Assembler::JumpToJumpRegister(Address pc) {
// Address pc points to lui/ori instructions.
// Jump to label may follow at pc + 2 * kInstrSize.
uint32_t* p = reinterpret_cast<uint32_t*>(pc);
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698