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

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

Issue 12177012: Small improvement in x64 assembler (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 10 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/macro-assembler-x64.cc » ('j') | src/x64/macro-assembler-x64.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64.cc
===================================================================
--- src/x64/assembler-x64.cc (revision 13579)
+++ src/x64/assembler-x64.cc (working copy)
@@ -1505,13 +1505,12 @@
void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) {
// Non-relocatable values might not need a 64-bit representation.
if (RelocInfo::IsNone(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)) {
+ if (is_uint32(value)) {
movl(dst, Immediate(static_cast<int32_t>(value)));
return;
+ } else if (is_int32(value)) {
Yang 2013/02/06 10:28:59 What is the purpose of this change?
Zheng Liu 2013/02/06 11:34:08 Code might be smaller, as [mov r64, imm32] always
Yang 2013/02/06 11:39:18 But this change seems to be to the effect of chang
+ movq(dst, Immediate(static_cast<int32_t>(value)));
+ return;
}
// Value cannot be represented by 32 bits, so do a full 64 bit immediate
// value.
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | src/x64/macro-assembler-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698