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

Unified Diff: src/mips64/macro-assembler-mips64.cc

Issue 1216823003: MIPS64: Fix hidden bug in relocations for j and jal. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 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
« src/mips64/assembler-mips64.cc ('K') | « src/mips64/constants-mips64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index 83f1a783ff43889a66423c1e3702e1eda187ffd4..b6dc240c498d9cffe8dc2141d11b24e5f38ae71e 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -3193,15 +3193,12 @@ void MacroAssembler::Ret(Condition cond,
void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) {
BlockTrampolinePoolScope block_trampoline_pool(this);
-
- uint64_t imm28;
- imm28 = jump_address(L);
{
BlockGrowBufferScope block_buf_growth(this);
// Buffer growth (and relocation) must be blocked for internal references
// until associated instructions are emitted and available to be patched.
RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED);
- j(imm28);
+ j(L);
}
// Emit a nop in the branch delay slot if required.
if (bdslot == PROTECT) nop();
@@ -3210,15 +3207,12 @@ void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) {
void MacroAssembler::Jal(Label* L, BranchDelaySlot bdslot) {
BlockTrampolinePoolScope block_trampoline_pool(this);
-
- uint64_t imm28;
- imm28 = jump_address(L);
{
BlockGrowBufferScope block_buf_growth(this);
// Buffer growth (and relocation) must be blocked for internal references
// until associated instructions are emitted and available to be patched.
RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED);
- jal(imm28);
+ jal(L);
}
// Emit a nop in the branch delay slot if required.
if (bdslot == PROTECT) nop();
« src/mips64/assembler-mips64.cc ('K') | « src/mips64/constants-mips64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698