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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 } 859 }
860 860
861 861
862 void Assembler::cmp(const Operand& op, const Immediate& imm) { 862 void Assembler::cmp(const Operand& op, const Immediate& imm) {
863 EnsureSpace ensure_space(this); 863 EnsureSpace ensure_space(this);
864 last_pc_ = pc_; 864 last_pc_ = pc_;
865 emit_arith(7, op, imm); 865 emit_arith(7, op, imm);
866 } 866 }
867 867
868 868
869 void Assembler::cld() {
870 EnsureSpace ensure_space(this);
871 last_pc_ = pc_;
872 EMIT(0xFC); // CLD to ensure forward operation
873 }
874
875
876 void Assembler::cmpb_al(const Operand& op) {
877 EnsureSpace ensure_space(this);
878 last_pc_ = pc_;
879 EMIT(0x38); // CMP r/m8, r8
880 emit_operand(eax, op); // eax has same code as register al.
881 }
882
883
884 void Assembler::cmpw_ax(const Operand& op) {
885 EnsureSpace ensure_space(this);
886 last_pc_ = pc_;
887 EMIT(0x66);
888 EMIT(0x39); // CMP r/m16, r16
889 emit_operand(eax, op); // eax has same code as register ax.
890 }
891
892
893 void Assembler::cmpsb() {
894 EnsureSpace ensure_space(this);
895 last_pc_ = pc_;
896 EMIT(0xA6); // CMPSB
897 }
898
899
869 void Assembler::rep_cmpsb() { 900 void Assembler::rep_cmpsb() {
870 EnsureSpace ensure_space(this); 901 EnsureSpace ensure_space(this);
871 last_pc_ = pc_; 902 last_pc_ = pc_;
872 EMIT(0xFC); // CLD to ensure forward operation 903 EMIT(0xFC); // CLD to ensure forward operation
873 EMIT(0xF3); // REP 904 EMIT(0xF3); // REP
874 EMIT(0xA6); // CMPSB 905 EMIT(0xA6); // CMPSB
875 } 906 }
876 907
877 void Assembler::rep_cmpsw() { 908 void Assembler::rep_cmpsw() {
878 EnsureSpace ensure_space(this); 909 EnsureSpace ensure_space(this);
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 ASSERT(bound_label.is_bound()); 2164 ASSERT(bound_label.is_bound());
2134 ASSERT(0 <= position); 2165 ASSERT(0 <= position);
2135 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset()); 2166 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset());
2136 ASSERT(long_at(position) == 0); // only initialize once! 2167 ASSERT(long_at(position) == 0); // only initialize once!
2137 2168
2138 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); 2169 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos()));
2139 long_at_put(position, label_loc); 2170 long_at_put(position, label_loc);
2140 } 2171 }
2141 2172
2142 } } // namespace v8::internal 2173 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698