| OLD | NEW |
| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 __ mov(edx, Operand(edx, 0)); | 658 __ mov(edx, Operand(edx, 0)); |
| 659 // Add start to length to complete esi setup. | 659 // Add start to length to complete esi setup. |
| 660 __ add(esi, Operand(edx)); | 660 __ add(esi, Operand(edx)); |
| 661 if (num_saved_registers_ > 0) { | 661 if (num_saved_registers_ > 0) { |
| 662 // Fill saved registers with initial value = start offset - 1 | 662 // Fill saved registers with initial value = start offset - 1 |
| 663 // Fill in stack push order, to avoid accessing across an unwritten | 663 // Fill in stack push order, to avoid accessing across an unwritten |
| 664 // page (a problem on Windows). | 664 // page (a problem on Windows). |
| 665 const int kRegisterZeroEBPOffset = -1; | 665 const int kRegisterZeroEBPOffset = -1; |
| 666 __ mov(ecx, kRegisterZeroEBPOffset); | 666 __ mov(ecx, kRegisterZeroEBPOffset); |
| 667 // Set eax to address of char before start of input. | 667 // Set eax to address of char before start of input. |
| 668 __ lea(eax, Operand(edi, -char_size())); | 668 __ lea(eax, Operand(edi, -static_cast<int32_t>(char_size()))); |
| 669 Label init_loop; | 669 Label init_loop; |
| 670 __ bind(&init_loop); | 670 __ bind(&init_loop); |
| 671 __ mov(Operand(ebp, ecx, times_4, +0), eax); | 671 __ mov(Operand(ebp, ecx, times_4, +0), eax); |
| 672 __ sub(Operand(ecx), Immediate(1)); | 672 __ sub(Operand(ecx), Immediate(1)); |
| 673 __ cmp(ecx, -num_saved_registers_); | 673 __ cmp(ecx, -num_saved_registers_); |
| 674 __ j(greater_equal, &init_loop); | 674 __ j(greater_equal, &init_loop); |
| 675 } | 675 } |
| 676 // Ensure that we have written to each stack page. Skipping a page on | 676 // Ensure that we have written to each stack page. Skipping a page on |
| 677 // Windows can cause segmentation faults. Assuming page size is 4k. | 677 // Windows can cause segmentation faults. Assuming page size is 4k. |
| 678 const int kPageSize = 4096; | 678 const int kPageSize = 4096; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 | 1193 |
| 1194 | 1194 |
| 1195 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, | 1195 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, |
| 1196 ArraySlice* buffer) { | 1196 ArraySlice* buffer) { |
| 1197 __ mov(reg, buffer->array()); | 1197 __ mov(reg, buffer->array()); |
| 1198 __ add(Operand(reg), Immediate(buffer->base_offset())); | 1198 __ add(Operand(reg), Immediate(buffer->base_offset())); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 #undef __ | 1201 #undef __ |
| 1202 }} // namespace v8::internal | 1202 }} // namespace v8::internal |
| OLD | NEW |