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

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

Issue 155223: X64: Fix recently introduced bug in movq with 64-bit literal. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64.cc
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc
index 989a748933467c1bbbb7915ed57d2bedf78b899b..167334f39a6ad67aefd12f8a42e691235b3bb478 100644
--- a/src/x64/assembler-x64.cc
+++ b/src/x64/assembler-x64.cc
@@ -1084,18 +1084,19 @@ void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) {
// Sadly, there is no zero or sign extending move for 8-bit immediates.
if (is_int32(value)) {
movq(dst, Immediate(static_cast<int32_t>(value)));
+ return;
} else if (is_uint32(value)) {
movl(dst, Immediate(static_cast<int32_t>(value)));
+ return;
}
// Value cannot be represented by 32 bits, so do a full 64 bit immediate
// value.
- } else {
- EnsureSpace ensure_space(this);
- last_pc_ = pc_;
- emit_rex_64(dst);
- emit(0xB8 | dst.low_bits());
- emitq(value, rmode);
}
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ emit_rex_64(dst);
+ emit(0xB8 | dst.low_bits());
+ emitq(value, rmode);
}
« no previous file with comments | « no previous file | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698