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

Unified Diff: src/macro-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/macro-assembler-ia32.cc
diff --git a/src/macro-assembler-ia32.cc b/src/macro-assembler-ia32.cc
index 72808de4d1b86aff8e0185259214af364e3c96fa..bfe0a7843c871e98be44895554c635821de92b64 100644
--- a/src/macro-assembler-ia32.cc
+++ b/src/macro-assembler-ia32.cc
@@ -293,7 +293,7 @@ void MacroAssembler::Set(Register dst, const Immediate& x) {
if (x.is_zero()) {
xor_(dst, Operand(dst)); // shorter than mov
} else {
- mov(Operand(dst), x);
+ mov(dst, x);
}
}
@@ -695,7 +695,7 @@ void MacroAssembler::IllegalOperation(int num_arguments) {
if (num_arguments > 0) {
add(Operand(esp), Immediate(num_arguments * kPointerSize));
}
- mov(Operand(eax), Immediate(Factory::undefined_value()));
+ mov(eax, Immediate(Factory::undefined_value()));
Kevin Millikin (Chromium) 2008/11/10 15:05:41 Just mov(eax, Factory::undefined_value())?
}
@@ -726,14 +726,14 @@ void MacroAssembler::TailCallRuntime(const ExternalReference& ext,
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
// smarter.
- mov(Operand(eax), Immediate(num_arguments));
+ Set(eax, Immediate(num_arguments));
JumpToBuiltin(ext);
}
void MacroAssembler::JumpToBuiltin(const ExternalReference& ext) {
// Set the entry point and jump to the C entry runtime stub.
- mov(Operand(ebx), Immediate(ext));
+ mov(ebx, Immediate(ext));
CEntryStub ces;
jmp(ces.GetCode(), RelocInfo::CODE_TARGET);
}
@@ -787,7 +787,7 @@ void MacroAssembler::InvokePrologue(const ParameterCount& expected,
Handle<Code> adaptor =
Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline));
if (!code_constant.is_null()) {
- mov(Operand(edx), Immediate(code_constant));
+ mov(edx, Immediate(code_constant));
Kevin Millikin (Chromium) 2008/11/10 15:05:41 Ditto.
add(Operand(edx), Immediate(Code::kHeaderSize - kHeapObjectTag));
} else if (!code_operand.is_reg(edx)) {
mov(edx, code_operand);

Powered by Google App Engine
This is Rietveld 408576698