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

Unified Diff: src/assembler-ia32.cc

Issue 14457: * Removed rep cmpsb everywhere in irregexp-ia32 (Closed)
Patch Set: Changes in back-reference handling Created 12 years 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 c174ea04adc582a23f6650ceaf18a98db0975dcf..99d76a906c55887fbab30c76d849b0a128dd6865 100644
--- a/src/assembler-ia32.cc
+++ b/src/assembler-ia32.cc
@@ -866,6 +866,37 @@ void Assembler::cmp(const Operand& op, const Immediate& imm) {
}
+void Assembler::cld() {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0xFC); // CLD to ensure forward operation
+}
+
+
+void Assembler::cmpb_al(const Operand& op) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0x38); // CMP r/m8, r8
+ emit_operand(eax, op); // eax has same code as register al.
+}
+
+
+void Assembler::cmpw_ax(const Operand& op) {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0x66);
+ EMIT(0x39); // CMP r/m16, r16
+ emit_operand(eax, op); // eax has same code as register ax.
+}
+
+
+void Assembler::cmpsb() {
+ EnsureSpace ensure_space(this);
+ last_pc_ = pc_;
+ EMIT(0xA6); // CMPSB
+}
+
+
void Assembler::rep_cmpsb() {
EnsureSpace ensure_space(this);
last_pc_ = pc_;

Powered by Google App Engine
This is Rietveld 408576698