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

Unified Diff: src/assembler-ia32.cc

Issue 10002: Use shorting encoding for mov reg, imm. (Closed)
Patch Set: Remove an accidental change Created 12 years, 1 month 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
Index: src/assembler-ia32.cc
diff --git a/src/assembler-ia32.cc b/src/assembler-ia32.cc
index 610542b596e7f6fa26b7e48bd1c353ea076172bd..264ef4237e318e193ef634adf9aa44d13efa7dc7 100644
--- a/src/assembler-ia32.cc
+++ b/src/assembler-ia32.cc
@@ -597,6 +597,14 @@ void Assembler::mov(Register dst, int32_t imm32) {
}
+void Assembler::mov(Register dst, const Immediate& x) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0xB8 | dst.code());
+ emit(x);
+}
+
+
void Assembler::mov(Register dst, Handle<Object> handle) {
EnsureSpace ensure_space(this);
last_pc_ = pc_;
@@ -613,6 +621,14 @@ void Assembler::mov(Register dst, const Operand& src) {
}
+void Assembler::mov(Register dst, Register src) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0x89);
+ EMIT(0xC0 | src.code() << 3 | dst.code());
+}
+
+
void Assembler::mov(const Operand& dst, const Immediate& x) {
EnsureSpace ensure_space(this);
last_pc_ = pc_;
« no previous file with comments | « src/assembler-ia32.h ('k') | src/builtins-ia32.cc » ('j') | src/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698