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

Side by Side Diff: src/assembler-ia32.cc

Issue 12807: * Fixes and tweaks to regexp-ia32. (Closed)
Patch Set: 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 833
834 834
835 void Assembler::and_(const Operand& dst, Register src) { 835 void Assembler::and_(const Operand& dst, Register src) {
836 EnsureSpace ensure_space(this); 836 EnsureSpace ensure_space(this);
837 last_pc_ = pc_; 837 last_pc_ = pc_;
838 EMIT(0x21); 838 EMIT(0x21);
839 emit_operand(src, dst); 839 emit_operand(src, dst);
840 } 840 }
841 841
842 842
843 void Assembler::cmpb(const Operand& op, int8_t imm8) {
844 EnsureSpace ensure_space(this);
845 last_pc_ = pc_;
846 EMIT(0x80);
847 emit_operand(edi, op); // edi == 7
848 EMIT(imm8);
849 }
850
851
852 void Assembler::cmpw(const Operand& op, Immediate imm16) {
853 ASSERT(imm16.is_int16());
854 EnsureSpace ensure_space(this);
855 last_pc_ = pc_;
856 EMIT(0x66);
857 EMIT(0x81);
858 emit_operand(edi, op);
859 emit_w(imm16);
860 }
861
862
843 void Assembler::cmp(Register reg, int32_t imm32) { 863 void Assembler::cmp(Register reg, int32_t imm32) {
844 EnsureSpace ensure_space(this); 864 EnsureSpace ensure_space(this);
845 last_pc_ = pc_; 865 last_pc_ = pc_;
846 emit_arith(7, Operand(reg), Immediate(imm32)); 866 emit_arith(7, Operand(reg), Immediate(imm32));
847 } 867 }
848 868
849 869
850 void Assembler::cmp(Register reg, Handle<Object> handle) { 870 void Assembler::cmp(Register reg, Handle<Object> handle) {
851 EnsureSpace ensure_space(this); 871 EnsureSpace ensure_space(this);
852 last_pc_ = pc_; 872 last_pc_ = pc_;
(...skipping 17 matching lines...) Expand all
870 890
871 891
872 void Assembler::rep_cmpsb() { 892 void Assembler::rep_cmpsb() {
873 EnsureSpace ensure_space(this); 893 EnsureSpace ensure_space(this);
874 last_pc_ = pc_; 894 last_pc_ = pc_;
875 EMIT(0xFC); // CLD to ensure forward operation 895 EMIT(0xFC); // CLD to ensure forward operation
876 EMIT(0xF3); // REP 896 EMIT(0xF3); // REP
877 EMIT(0xA6); // CMPSB 897 EMIT(0xA6); // CMPSB
878 } 898 }
879 899
880 void Assembler::rep_cmpsl() { 900 void Assembler::rep_cmpsw() {
881 EnsureSpace ensure_space(this); 901 EnsureSpace ensure_space(this);
882 last_pc_ = pc_; 902 last_pc_ = pc_;
883 EMIT(0xFC); // CLD to ensure forward operation 903 EMIT(0xFC); // CLD to ensure forward operation
884 EMIT(0xF3); // REP 904 EMIT(0xF3); // REP
885 EMIT(0xA7); // CMPSW 905 EMIT(0x66); // Operand size overide.
906 EMIT(0xA7); // CMPS
886 } 907 }
887 908
888 909
889 void Assembler::dec_b(Register dst) { 910 void Assembler::dec_b(Register dst) {
890 EnsureSpace ensure_space(this); 911 EnsureSpace ensure_space(this);
891 last_pc_ = pc_; 912 last_pc_ = pc_;
892 EMIT(0xFE); 913 EMIT(0xFE);
893 EMIT(0xC8 | dst.code()); 914 EMIT(0xC8 | dst.code());
894 } 915 }
895 916
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 ASSERT(bound_label.is_bound()); 2156 ASSERT(bound_label.is_bound());
2136 ASSERT(0 <= position); 2157 ASSERT(0 <= position);
2137 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset()); 2158 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset());
2138 ASSERT(long_at(position) == 0); // only initialize once! 2159 ASSERT(long_at(position) == 0); // only initialize once!
2139 2160
2140 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); 2161 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos()));
2141 long_at_put(position, label_loc); 2162 long_at_put(position, label_loc);
2142 } 2163 }
2143 2164
2144 } } // namespace v8::internal 2165 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler-ia32.h ('k') | src/jsregexp.cc » ('j') | src/regexp-macro-assembler-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698