Index: src/x64/regexp-macro-assembler-x64.cc |
diff --git a/src/x64/regexp-macro-assembler-x64.cc b/src/x64/regexp-macro-assembler-x64.cc |
index baaa4ba9007b029b6755a41dc191c0e843805efe..586c61a159d724c37663d2ae015ea656614adeff 100644 |
--- a/src/x64/regexp-macro-assembler-x64.cc |
+++ b/src/x64/regexp-macro-assembler-x64.cc |
@@ -203,7 +203,7 @@ void RegExpMacroAssemblerX64::CheckAtStart(Label* on_at_start) { |
__ cmpl(Operand(rbp, kStartIndex), Immediate(0)); |
BranchOrBacktrack(not_equal, ¬_at_start); |
// If we did, are we still at the start of the input? |
- __ lea(rax, Operand(rsi, rdi, times_1, 0)); |
+ __ leap(rax, Operand(rsi, rdi, times_1, 0)); |
__ cmpp(rax, Operand(rbp, kInputStart)); |
BranchOrBacktrack(equal, on_at_start); |
__ bind(¬_at_start); |
@@ -215,7 +215,7 @@ void RegExpMacroAssemblerX64::CheckNotAtStart(Label* on_not_at_start) { |
__ cmpl(Operand(rbp, kStartIndex), Immediate(0)); |
BranchOrBacktrack(not_equal, on_not_at_start); |
// If we did, are we still at the start of the input? |
- __ lea(rax, Operand(rsi, rdi, times_1, 0)); |
+ __ leap(rax, Operand(rsi, rdi, times_1, 0)); |
__ cmpp(rax, Operand(rbp, kInputStart)); |
BranchOrBacktrack(not_equal, on_not_at_start); |
} |
@@ -273,8 +273,8 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase( |
on_no_match = &backtrack_label_; |
} |
- __ lea(r9, Operand(rsi, rdx, times_1, 0)); |
- __ lea(r11, Operand(rsi, rdi, times_1, 0)); |
+ __ leap(r9, Operand(rsi, rdx, times_1, 0)); |
+ __ leap(r11, Operand(rsi, rdi, times_1, 0)); |
__ addp(rbx, r9); // End of capture |
// --------------------- |
// r11 - current input character address |
@@ -337,18 +337,18 @@ void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase( |
// Isolate* isolate |
#ifdef _WIN64 |
// Compute and set byte_offset1 (start of capture). |
- __ lea(rcx, Operand(rsi, rdx, times_1, 0)); |
+ __ leap(rcx, Operand(rsi, rdx, times_1, 0)); |
// Set byte_offset2. |
- __ lea(rdx, Operand(rsi, rdi, times_1, 0)); |
+ __ leap(rdx, Operand(rsi, rdi, times_1, 0)); |
// Set byte_length. |
__ movp(r8, rbx); |
// Isolate. |
__ LoadAddress(r9, ExternalReference::isolate_address(isolate())); |
#else // AMD64 calling convention |
// Compute byte_offset2 (current position = rsi+rdi). |
- __ lea(rax, Operand(rsi, rdi, times_1, 0)); |
+ __ leap(rax, Operand(rsi, rdi, times_1, 0)); |
// Compute and set byte_offset1 (start of capture). |
- __ lea(rdi, Operand(rsi, rdx, times_1, 0)); |
+ __ leap(rdi, Operand(rsi, rdx, times_1, 0)); |
// Set byte_offset2. |
__ movp(rsi, rax); |
// Set byte_length. |
@@ -412,9 +412,9 @@ void RegExpMacroAssemblerX64::CheckNotBackReference( |
BranchOrBacktrack(greater, on_no_match); |
// Compute pointers to match string and capture string |
- __ lea(rbx, Operand(rsi, rdi, times_1, 0)); // Start of match. |
+ __ leap(rbx, Operand(rsi, rdi, times_1, 0)); // Start of match. |
__ addp(rdx, rsi); // Start of capture. |
- __ lea(r9, Operand(rdx, rax, times_1, 0)); // End of capture |
+ __ leap(r9, Operand(rdx, rax, times_1, 0)); // End of capture |
// ----------------------- |
// rbx - current capture character address. |
@@ -489,7 +489,7 @@ void RegExpMacroAssemblerX64::CheckNotCharacterAfterMinusAnd( |
uc16 mask, |
Label* on_not_equal) { |
ASSERT(minus < String::kMaxUtf16CodeUnit); |
- __ lea(rax, Operand(current_character(), -minus)); |
+ __ leap(rax, Operand(current_character(), -minus)); |
__ and_(rax, Immediate(mask)); |
__ cmpl(rax, Immediate(c)); |
BranchOrBacktrack(not_equal, on_not_equal); |
@@ -536,7 +536,7 @@ bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type, |
Label* on_no_match) { |
// Range checks (c in min..max) are generally implemented by an unsigned |
// (c - min) <= (max - min) check, using the sequence: |
- // lea(rax, Operand(current_character(), -min)) or sub(rax, Immediate(min)) |
+ // leap(rax, Operand(current_character(), -min)) or sub(rax, Immediate(min)) |
// cmp(rax, Immediate(max - min)) |
switch (type) { |
case 's': |
@@ -547,7 +547,7 @@ bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type, |
__ cmpl(current_character(), Immediate(' ')); |
__ j(equal, &success, Label::kNear); |
// Check range 0x09..0x0d |
- __ lea(rax, Operand(current_character(), -'\t')); |
+ __ leap(rax, Operand(current_character(), -'\t')); |
__ cmpl(rax, Immediate('\r' - '\t')); |
__ j(below_equal, &success, Label::kNear); |
// \u00a0 (NBSP). |
@@ -562,13 +562,13 @@ bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type, |
return false; |
case 'd': |
// Match ASCII digits ('0'..'9') |
- __ lea(rax, Operand(current_character(), -'0')); |
+ __ leap(rax, Operand(current_character(), -'0')); |
__ cmpl(rax, Immediate('9' - '0')); |
BranchOrBacktrack(above, on_no_match); |
return true; |
case 'D': |
// Match non ASCII-digits |
- __ lea(rax, Operand(current_character(), -'0')); |
+ __ leap(rax, Operand(current_character(), -'0')); |
__ cmpl(rax, Immediate('9' - '0')); |
BranchOrBacktrack(below_equal, on_no_match); |
return true; |
@@ -753,9 +753,9 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { |
__ movp(rbx, Operand(rbp, kStartIndex)); |
__ negq(rbx); |
if (mode_ == UC16) { |
- __ lea(rax, Operand(rdi, rbx, times_2, -char_size())); |
+ __ leap(rax, Operand(rdi, rbx, times_2, -char_size())); |
} else { |
- __ lea(rax, Operand(rdi, rbx, times_1, -char_size())); |
+ __ leap(rax, Operand(rdi, rbx, times_1, -char_size())); |
} |
// Store this value in a local variable, for use when clearing |
// position registers. |
@@ -826,7 +826,7 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { |
__ movp(rcx, Operand(rbp, kInputEnd)); |
__ subp(rcx, Operand(rbp, kInputStart)); |
if (mode_ == UC16) { |
- __ lea(rcx, Operand(rcx, rdx, times_2, 0)); |
+ __ leap(rcx, Operand(rcx, rdx, times_2, 0)); |
} else { |
__ addp(rcx, rdx); |
} |
@@ -896,7 +896,7 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { |
__ bind(&return_rax); |
#ifdef _WIN64 |
// Restore callee save registers. |
- __ lea(rsp, Operand(rbp, kLastCalleeSaveRegister)); |
+ __ leap(rsp, Operand(rbp, kLastCalleeSaveRegister)); |
__ popq(rbx); |
__ popq(rdi); |
__ popq(rsi); |
@@ -960,12 +960,12 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { |
#ifdef _WIN64 |
// Microsoft passes parameters in rcx, rdx, r8. |
// First argument, backtrack stackpointer, is already in rcx. |
- __ lea(rdx, Operand(rbp, kStackHighEnd)); // Second argument |
+ __ leap(rdx, Operand(rbp, kStackHighEnd)); // Second argument |
__ LoadAddress(r8, ExternalReference::isolate_address(isolate())); |
#else |
// AMD64 ABI passes parameters in rdi, rsi, rdx. |
__ movp(rdi, backtrack_stackpointer()); // First argument. |
- __ lea(rsi, Operand(rbp, kStackHighEnd)); // Second argument. |
+ __ leap(rsi, Operand(rbp, kStackHighEnd)); // Second argument. |
__ LoadAddress(rdx, ExternalReference::isolate_address(isolate())); |
#endif |
ExternalReference grow_stack = |
@@ -1125,7 +1125,7 @@ void RegExpMacroAssemblerX64::WriteCurrentPositionToRegister(int reg, |
if (cp_offset == 0) { |
__ movp(register_location(reg), rdi); |
} else { |
- __ lea(rax, Operand(rdi, cp_offset * char_size())); |
+ __ leap(rax, Operand(rdi, cp_offset * char_size())); |
__ movp(register_location(reg), rax); |
} |
} |
@@ -1161,7 +1161,7 @@ void RegExpMacroAssemblerX64::CallCheckStackGuardState() { |
__ movp(r8, rbp); |
// First argument: Next address on the stack (will be address of |
// return address). |
- __ lea(rcx, Operand(rsp, -kPointerSize)); |
+ __ leap(rcx, Operand(rsp, -kPointerSize)); |
#else |
// Third argument: RegExp code frame pointer. |
__ movp(rdx, rbp); |
@@ -1169,7 +1169,7 @@ void RegExpMacroAssemblerX64::CallCheckStackGuardState() { |
__ movp(rsi, code_object_pointer()); |
// First argument: Next address on the stack (will be address of |
// return address). |
- __ lea(rdi, Operand(rsp, -kPointerSize)); |
+ __ leap(rdi, Operand(rsp, -kRegisterSize)); |
#endif |
ExternalReference stack_check = |
ExternalReference::re_check_stack_guard_state(isolate()); |