OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/log.h" | 10 #include "src/log.h" |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 | 1039 |
1040 | 1040 |
1041 // Private methods: | 1041 // Private methods: |
1042 | 1042 |
1043 void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { | 1043 void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { |
1044 int stack_alignment = base::OS::ActivationFrameAlignment(); | 1044 int stack_alignment = base::OS::ActivationFrameAlignment(); |
1045 | 1045 |
1046 // Align the stack pointer and save the original sp value on the stack. | 1046 // Align the stack pointer and save the original sp value on the stack. |
1047 __ mov(scratch, sp); | 1047 __ mov(scratch, sp); |
1048 __ Subu(sp, sp, Operand(kPointerSize)); | 1048 __ Subu(sp, sp, Operand(kPointerSize)); |
1049 DCHECK(IsPowerOf2(stack_alignment)); | 1049 DCHECK(base::bits::IsPowerOfTwo32(stack_alignment)); |
1050 __ And(sp, sp, Operand(-stack_alignment)); | 1050 __ And(sp, sp, Operand(-stack_alignment)); |
1051 __ sw(scratch, MemOperand(sp)); | 1051 __ sw(scratch, MemOperand(sp)); |
1052 | 1052 |
1053 __ mov(a2, frame_pointer()); | 1053 __ mov(a2, frame_pointer()); |
1054 // Code* of self. | 1054 // Code* of self. |
1055 __ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE); | 1055 __ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE); |
1056 | 1056 |
1057 // We need to make room for the return address on the stack. | 1057 // We need to make room for the return address on the stack. |
1058 DCHECK(IsAligned(stack_alignment, kPointerSize)); | 1058 DCHECK(IsAligned(stack_alignment, kPointerSize)); |
1059 __ Subu(sp, sp, Operand(stack_alignment)); | 1059 __ Subu(sp, sp, Operand(stack_alignment)); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 } | 1317 } |
1318 | 1318 |
1319 | 1319 |
1320 #undef __ | 1320 #undef __ |
1321 | 1321 |
1322 #endif // V8_INTERPRETED_REGEXP | 1322 #endif // V8_INTERPRETED_REGEXP |
1323 | 1323 |
1324 }} // namespace v8::internal | 1324 }} // namespace v8::internal |
1325 | 1325 |
1326 #endif // V8_TARGET_ARCH_MIPS | 1326 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |