OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 __ StoreP(r3, register_location(reg), r0); | 164 __ StoreP(r3, register_location(reg), r0); |
165 } | 165 } |
166 } | 166 } |
167 | 167 |
168 | 168 |
169 void RegExpMacroAssemblerPPC::Backtrack() { | 169 void RegExpMacroAssemblerPPC::Backtrack() { |
170 CheckPreemption(); | 170 CheckPreemption(); |
171 // Pop Code* offset from backtrack stack, add Code* and jump to location. | 171 // Pop Code* offset from backtrack stack, add Code* and jump to location. |
172 Pop(r3); | 172 Pop(r3); |
173 __ add(r3, r3, code_pointer()); | 173 __ add(r3, r3, code_pointer()); |
174 __ mtctr(r3); | 174 __ Jump(r3); |
175 __ bctr(); | |
176 } | 175 } |
177 | 176 |
178 | 177 |
179 void RegExpMacroAssemblerPPC::Bind(Label* label) { __ bind(label); } | 178 void RegExpMacroAssemblerPPC::Bind(Label* label) { __ bind(label); } |
180 | 179 |
181 | 180 |
182 void RegExpMacroAssemblerPPC::CheckCharacter(uint32_t c, Label* on_equal) { | 181 void RegExpMacroAssemblerPPC::CheckCharacter(uint32_t c, Label* on_equal) { |
183 __ Cmpli(current_character(), Operand(c), r0); | 182 __ Cmpli(current_character(), Operand(c), r0); |
184 BranchOrBacktrack(eq, on_equal); | 183 BranchOrBacktrack(eq, on_equal); |
185 } | 184 } |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 if (global()) { | 826 if (global()) { |
828 __ LoadP(r3, MemOperand(frame_pointer(), kSuccessfulCaptures)); | 827 __ LoadP(r3, MemOperand(frame_pointer(), kSuccessfulCaptures)); |
829 } | 828 } |
830 | 829 |
831 __ bind(&return_r3); | 830 __ bind(&return_r3); |
832 // Skip sp past regexp registers and local variables.. | 831 // Skip sp past regexp registers and local variables.. |
833 __ mr(sp, frame_pointer()); | 832 __ mr(sp, frame_pointer()); |
834 // Restore registers r25..r31 and return (restoring lr to pc). | 833 // Restore registers r25..r31 and return (restoring lr to pc). |
835 __ MultiPop(registers_to_retain); | 834 __ MultiPop(registers_to_retain); |
836 __ pop(r0); | 835 __ pop(r0); |
837 __ mtctr(r0); | 836 __ mtlr(r0); |
838 __ bctr(); | 837 __ blr(); |
839 | 838 |
840 // Backtrack code (branch target for conditional backtracks). | 839 // Backtrack code (branch target for conditional backtracks). |
841 if (backtrack_label_.is_linked()) { | 840 if (backtrack_label_.is_linked()) { |
842 __ bind(&backtrack_label_); | 841 __ bind(&backtrack_label_); |
843 Backtrack(); | 842 Backtrack(); |
844 } | 843 } |
845 | 844 |
846 Label exit_with_exception; | 845 Label exit_with_exception; |
847 | 846 |
848 // Preempt-code | 847 // Preempt-code |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 } | 1245 } |
1247 | 1246 |
1248 | 1247 |
1249 #undef __ | 1248 #undef __ |
1250 | 1249 |
1251 #endif // V8_INTERPRETED_REGEXP | 1250 #endif // V8_INTERPRETED_REGEXP |
1252 } // namespace internal | 1251 } // namespace internal |
1253 } // namespace v8 | 1252 } // namespace v8 |
1254 | 1253 |
1255 #endif // V8_TARGET_ARCH_PPC | 1254 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |