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

Unified Diff: src/mips/assembler-mips.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 | « no previous file | src/mips64/assembler-mips64.cc » ('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 3e7ec15b0d2d4b49bf9cebf87480624271e07588..e05fc015a838c7bd6ffd729e91937ae7bc5ee063 100644
--- a/src/mips/assembler-mips.cc
+++ b/src/mips/assembler-mips.cc
@@ -2580,15 +2580,15 @@ void Assembler::dd(uint32_t data) {
void Assembler::dd(Label* label) {
CheckBuffer();
RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
+ uint32_t data;
if (label->is_bound()) {
- uint32_t data = reinterpret_cast<uint32_t>(buffer_ + label->pos());
- *reinterpret_cast<uint32_t*>(pc_) = data;
- pc_ += sizeof(uint32_t);
+ data = reinterpret_cast<uint32_t>(buffer_ + label->pos());
} else {
- uint32_t target_pos = jump_address(label);
- emit(target_pos);
+ data = jump_address(label);
internal_reference_positions_.insert(label->pos());
}
+ *reinterpret_cast<uint32_t*>(pc_) = data;
+ pc_ += sizeof(uint32_t);
}
« no previous file with comments | « no previous file | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698