OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 }; | 120 }; |
121 | 121 |
122 | 122 |
123 static void EmitStackCheck(MacroAssembler* masm_, | 123 static void EmitStackCheck(MacroAssembler* masm_, |
124 Register stack_limit_scratch, | 124 Register stack_limit_scratch, |
125 int pointers = 0, | 125 int pointers = 0, |
126 Register scratch = sp) { | 126 Register scratch = sp) { |
127 Isolate* isolate = masm_->isolate(); | 127 Isolate* isolate = masm_->isolate(); |
128 Label ok; | 128 Label ok; |
129 ASSERT(scratch.is(sp) == (pointers == 0)); | 129 ASSERT(scratch.is(sp) == (pointers == 0)); |
| 130 Heap::RootListIndex index; |
130 if (pointers != 0) { | 131 if (pointers != 0) { |
131 __ Subu(scratch, sp, Operand(pointers * kPointerSize)); | 132 __ Subu(scratch, sp, Operand(pointers * kPointerSize)); |
| 133 index = Heap::kRealStackLimitRootIndex; |
| 134 } else { |
| 135 index = Heap::kStackLimitRootIndex; |
132 } | 136 } |
133 __ LoadRoot(stack_limit_scratch, Heap::kStackLimitRootIndex); | 137 __ LoadRoot(stack_limit_scratch, index); |
134 __ Branch(&ok, hs, scratch, Operand(stack_limit_scratch)); | 138 __ Branch(&ok, hs, scratch, Operand(stack_limit_scratch)); |
135 PredictableCodeSizeScope predictable(masm_, 4 * Assembler::kInstrSize); | 139 PredictableCodeSizeScope predictable(masm_, 4 * Assembler::kInstrSize); |
136 __ Call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); | 140 __ Call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); |
137 __ bind(&ok); | 141 __ bind(&ok); |
138 } | 142 } |
139 | 143 |
140 | 144 |
141 // Generate code for a JS function. On entry to the function the receiver | 145 // Generate code for a JS function. On entry to the function the receiver |
142 // and arguments have been pushed on the stack left to right. The actual | 146 // and arguments have been pushed on the stack left to right. The actual |
143 // argument count matches the formal parameter count expected by the | 147 // argument count matches the formal parameter count expected by the |
(...skipping 4813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4957 Assembler::target_address_at(pc_immediate_load_address)) == | 4961 Assembler::target_address_at(pc_immediate_load_address)) == |
4958 reinterpret_cast<uint32_t>( | 4962 reinterpret_cast<uint32_t>( |
4959 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4963 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4960 return OSR_AFTER_STACK_CHECK; | 4964 return OSR_AFTER_STACK_CHECK; |
4961 } | 4965 } |
4962 | 4966 |
4963 | 4967 |
4964 } } // namespace v8::internal | 4968 } } // namespace v8::internal |
4965 | 4969 |
4966 #endif // V8_TARGET_ARCH_MIPS | 4970 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |