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

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

Issue 12432: Oh, it has to work on Intel CPUs too? (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 int start_offset = cp_offset * char_size(); 176 int start_offset = cp_offset * char_size();
177 __ mov(ebx, edi); 177 __ mov(ebx, edi);
178 __ add(Operand(ebx), Immediate(start_offset + byte_length)); 178 __ add(Operand(ebx), Immediate(start_offset + byte_length));
179 BranchOrBacktrack(greater_equal, on_failure); 179 BranchOrBacktrack(greater_equal, on_failure);
180 180
181 ArraySlice constant_buffer = constants_.GetBuffer(str.length(), char_size()); 181 ArraySlice constant_buffer = constants_.GetBuffer(str.length(), char_size());
182 for (int i = 0; i < str.length(); i++) { 182 for (int i = 0; i < str.length(); i++) {
183 if (mode_ == ASCII) { 183 if (mode_ == ASCII) {
184 constant_buffer.at<char>(i) = static_cast<char>(str[i]); 184 constant_buffer.at<char>(i) = static_cast<char>(str[i]);
185 } else { 185 } else {
186 memcpy(constant_buffer.location<void>(), 186 memcpy(constant_buffer.location(),
187 str.start(), 187 str.start(),
188 str.length() * sizeof(uc16)); 188 str.length() * sizeof(uc16));
189 } 189 }
190 } 190 }
191 191
192 __ mov(eax, edi); 192 __ mov(eax, edi);
193 __ mov(ebx, esi); 193 __ mov(ebx, esi);
194 __ lea(edi, Operand(esi, edi, times_1, start_offset)); 194 __ lea(edi, Operand(esi, edi, times_1, start_offset));
195 LoadConstantBufferAddress(esi, &constant_buffer); 195 LoadConstantBufferAddress(esi, &constant_buffer);
196 __ mov(ecx, str.length()); 196 __ mov(ecx, str.length());
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 600
601 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, 601 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg,
602 ArraySlice* buffer) { 602 ArraySlice* buffer) {
603 __ mov(reg, buffer->array()); 603 __ mov(reg, buffer->array());
604 __ add(Operand(reg), Immediate(buffer->base_offset())); 604 __ add(Operand(reg), Immediate(buffer->base_offset()));
605 } 605 }
606 606
607 #undef __ 607 #undef __
608 }} 608 }}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698