OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 } | 1058 } |
1059 | 1059 |
1060 | 1060 |
1061 void RegExpMacroAssemblerX64::ReadStackPointerFromRegister(int reg) { | 1061 void RegExpMacroAssemblerX64::ReadStackPointerFromRegister(int reg) { |
1062 __ movq(backtrack_stackpointer(), register_location(reg)); | 1062 __ movq(backtrack_stackpointer(), register_location(reg)); |
1063 __ addq(backtrack_stackpointer(), Operand(rbp, kStackHighEnd)); | 1063 __ addq(backtrack_stackpointer(), Operand(rbp, kStackHighEnd)); |
1064 } | 1064 } |
1065 | 1065 |
1066 | 1066 |
1067 void RegExpMacroAssemblerX64::SetCurrentPositionFromEnd(int by) { | 1067 void RegExpMacroAssemblerX64::SetCurrentPositionFromEnd(int by) { |
1068 NearLabel after_position; | 1068 Label after_position; |
1069 __ cmpq(rdi, Immediate(-by * char_size())); | 1069 __ cmpq(rdi, Immediate(-by * char_size())); |
1070 __ j(greater_equal, &after_position); | 1070 __ j(greater_equal, &after_position, Label::kNear); |
1071 __ movq(rdi, Immediate(-by * char_size())); | 1071 __ movq(rdi, Immediate(-by * char_size())); |
1072 // On RegExp code entry (where this operation is used), the character before | 1072 // On RegExp code entry (where this operation is used), the character before |
1073 // the current position is expected to be already loaded. | 1073 // the current position is expected to be already loaded. |
1074 // We have advanced the position, so it's safe to read backwards. | 1074 // We have advanced the position, so it's safe to read backwards. |
1075 LoadCurrentCharacterUnchecked(-1, 1); | 1075 LoadCurrentCharacterUnchecked(-1, 1); |
1076 __ bind(&after_position); | 1076 __ bind(&after_position); |
1077 } | 1077 } |
1078 | 1078 |
1079 | 1079 |
1080 void RegExpMacroAssemblerX64::SetRegister(int register_index, int to) { | 1080 void RegExpMacroAssemblerX64::SetRegister(int register_index, int to) { |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 } | 1389 } |
1390 } | 1390 } |
1391 | 1391 |
1392 #undef __ | 1392 #undef __ |
1393 | 1393 |
1394 #endif // V8_INTERPRETED_REGEXP | 1394 #endif // V8_INTERPRETED_REGEXP |
1395 | 1395 |
1396 }} // namespace v8::internal | 1396 }} // namespace v8::internal |
1397 | 1397 |
1398 #endif // V8_TARGET_ARCH_X64 | 1398 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |