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

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

Issue 1127393003: MIPS: Fix Assembler::dd(Label*) implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/assembler-mips64.cc
diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc
index ee2daa45bb44cf980a5b919f7686af02426b3065..7a3091530336de4984369dbaa2fa7f69a0257722 100644
--- a/src/mips64/assembler-mips64.cc
+++ b/src/mips64/assembler-mips64.cc
@@ -2756,15 +2756,15 @@ void Assembler::dd(uint32_t data) {
void Assembler::dd(Label* label) {
CheckBuffer();
RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
+ uint64_t data;
if (label->is_bound()) {
- uint64_t data = reinterpret_cast<uint64_t>(buffer_ + label->pos());
- *reinterpret_cast<uint64_t*>(pc_) = data;
- pc_ += sizeof(uint64_t);
+ data = reinterpret_cast<uint64_t>(buffer_ + label->pos());
} else {
- uint64_t target_pos = jump_address(label);
- emit(target_pos);
+ data = jump_address(label);
internal_reference_positions_.insert(label->pos());
}
+ *reinterpret_cast<uint64_t*>(pc_) = data;
+ pc_ += sizeof(uint64_t);
}
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698