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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 | 1085 |
1086 | 1086 |
1087 // Private methods: | 1087 // Private methods: |
1088 | 1088 |
1089 void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { | 1089 void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { |
1090 int stack_alignment = base::OS::ActivationFrameAlignment(); | 1090 int stack_alignment = base::OS::ActivationFrameAlignment(); |
1091 | 1091 |
1092 // Align the stack pointer and save the original sp value on the stack. | 1092 // Align the stack pointer and save the original sp value on the stack. |
1093 __ mov(scratch, sp); | 1093 __ mov(scratch, sp); |
1094 __ Dsubu(sp, sp, Operand(kPointerSize)); | 1094 __ Dsubu(sp, sp, Operand(kPointerSize)); |
1095 DCHECK(IsPowerOf2(stack_alignment)); | 1095 DCHECK(base::bits::IsPowerOfTwo32(stack_alignment)); |
1096 __ And(sp, sp, Operand(-stack_alignment)); | 1096 __ And(sp, sp, Operand(-stack_alignment)); |
1097 __ sd(scratch, MemOperand(sp)); | 1097 __ sd(scratch, MemOperand(sp)); |
1098 | 1098 |
1099 __ mov(a2, frame_pointer()); | 1099 __ mov(a2, frame_pointer()); |
1100 // Code* of self. | 1100 // Code* of self. |
1101 __ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE); | 1101 __ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE); |
1102 | 1102 |
1103 // We need to make room for the return address on the stack. | 1103 // We need to make room for the return address on the stack. |
1104 DCHECK(IsAligned(stack_alignment, kPointerSize)); | 1104 DCHECK(IsAligned(stack_alignment, kPointerSize)); |
1105 __ Dsubu(sp, sp, Operand(stack_alignment)); | 1105 __ Dsubu(sp, sp, Operand(stack_alignment)); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 } | 1362 } |
1363 } | 1363 } |
1364 | 1364 |
1365 #undef __ | 1365 #undef __ |
1366 | 1366 |
1367 #endif // V8_INTERPRETED_REGEXP | 1367 #endif // V8_INTERPRETED_REGEXP |
1368 | 1368 |
1369 }} // namespace v8::internal | 1369 }} // namespace v8::internal |
1370 | 1370 |
1371 #endif // V8_TARGET_ARCH_MIPS64 | 1371 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |