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

Unified Diff: regexp2000/src/assembler-ia32.cc

Issue 10942: Start IA32 implemenetation of regexp2k (Closed)
Patch Set: Addressed review comments 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 | « regexp2000/src/assembler-ia32.h ('k') | regexp2000/src/assembler-ia32-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: regexp2000/src/assembler-ia32.cc
diff --git a/regexp2000/src/assembler-ia32.cc b/regexp2000/src/assembler-ia32.cc
index e41f1b76a322eb52585bae3b0afe57f206c918e4..989889ce0b87b6cd6bb3580277661f7148ec8650 100644
--- a/regexp2000/src/assembler-ia32.cc
+++ b/regexp2000/src/assembler-ia32.cc
@@ -545,6 +545,22 @@ void Assembler::pop(const Operand& dst) {
}
+void Assembler::enter(const Immediate& size) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0xC8);
+ emit_w(size);
+ EMIT(0);
+}
+
+
+void Assembler::leave() {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0xC9);
+}
+
+
void Assembler::mov_b(Register dst, const Operand& src) {
EnsureSpace ensure_space(this);
last_pc_ = pc_;
@@ -829,6 +845,23 @@ void Assembler::cmp(const Operand& op, const Immediate& imm) {
}
+void Assembler::rep_cmpsb() {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0xFC); // CLD to ensure forward operation
+ EMIT(0xF3); // REP
+ EMIT(0xA6); // CMPSB
+}
+
+void Assembler::rep_cmpsw() {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0xFC); // CLD to ensure forward operation
+ EMIT(0xF3); // REP
+ EMIT(0xA7); // CMPSW
+}
+
+
void Assembler::dec_b(Register dst) {
EnsureSpace ensure_space(this);
last_pc_ = pc_;
@@ -1170,6 +1203,15 @@ void Assembler::xor_(const Operand& dst, const Immediate& x) {
}
+void Assembler::bt(const Operand& dst, Register src) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0x0F);
+ EMIT(0xA3);
+ emit_operand(src, dst);
+}
+
+
void Assembler::bts(const Operand& dst, Register src) {
EnsureSpace ensure_space(this);
last_pc_ = pc_;
@@ -1223,13 +1265,6 @@ void Assembler::ret(int imm16) {
}
-void Assembler::leave() {
- EnsureSpace ensure_space(this);
- last_pc_ = pc_;
- EMIT(0xC9);
-}
-
-
// Labels refer to positions in the (to be) generated code.
// There are bound, linked, and unused labels.
//
« no previous file with comments | « regexp2000/src/assembler-ia32.h ('k') | regexp2000/src/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698