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

Unified Diff: src/assembler-ia32.cc

Issue 10693: Merged bleeding_edge -r 685:746 into regexp2000. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: 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
« no previous file with comments | « src/assembler-ia32.h ('k') | src/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler-ia32.cc
===================================================================
--- src/assembler-ia32.cc (revision 746)
+++ src/assembler-ia32.cc (working copy)
@@ -596,6 +596,14 @@
}
+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_;
@@ -612,6 +620,14 @@
}
+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_;
@@ -780,7 +796,7 @@
EnsureSpace ensure_space(this);
last_pc_ = pc_;
EMIT(0x21);
- emit_operand(dst, src);
+ emit_operand(src, dst);
}
@@ -948,7 +964,7 @@
EnsureSpace ensure_space(this);
last_pc_ = pc_;
EMIT(0x09);
- emit_operand(dst, src);
+ emit_operand(src, dst);
}
@@ -1076,7 +1092,7 @@
EnsureSpace ensure_space(this);
last_pc_ = pc_;
EMIT(0x29);
- emit_operand(dst, src);
+ emit_operand(src, dst);
}
@@ -2016,18 +2032,6 @@
}
-void Assembler::emit_operand(const Operand& adr, Register reg) {
- adr.set_reg(reg);
- memmove(pc_, adr.buf_, adr.len_);
- pc_ += adr.len_;
- if (adr.len_ >= sizeof(int32_t) && adr.rmode_ != RelocInfo::NONE) {
- pc_ -= sizeof(int32_t); // pc_ must be *at* disp32
- RecordRelocInfo(adr.rmode_);
- pc_ += sizeof(int32_t);
- }
-}
-
-
void Assembler::emit_farith(int b1, int b2, int i) {
ASSERT(is_uint8(b1) && is_uint8(b2)); // wrong opcode
ASSERT(0 <= i && i < 8); // illegal stack offset
« no previous file with comments | « src/assembler-ia32.h ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698