OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 }; | 110 }; |
111 | 111 |
112 | 112 |
113 static void EmitStackCheck(MacroAssembler* masm_, | 113 static void EmitStackCheck(MacroAssembler* masm_, |
114 int pointers = 0, | 114 int pointers = 0, |
115 Register scratch = jssp) { | 115 Register scratch = jssp) { |
116 Isolate* isolate = masm_->isolate(); | 116 Isolate* isolate = masm_->isolate(); |
117 Label ok; | 117 Label ok; |
118 ASSERT(jssp.Is(__ StackPointer())); | 118 ASSERT(jssp.Is(__ StackPointer())); |
119 ASSERT(scratch.Is(jssp) == (pointers == 0)); | 119 ASSERT(scratch.Is(jssp) == (pointers == 0)); |
| 120 Heap::RootListIndex index; |
120 if (pointers != 0) { | 121 if (pointers != 0) { |
121 __ Sub(scratch, jssp, pointers * kPointerSize); | 122 __ Sub(scratch, jssp, pointers * kPointerSize); |
| 123 index = Heap::kRealStackLimitRootIndex; |
| 124 } else { |
| 125 index = Heap::kStackLimitRootIndex; |
122 } | 126 } |
123 __ CompareRoot(scratch, Heap::kStackLimitRootIndex); | 127 __ CompareRoot(scratch, index); |
124 __ B(hs, &ok); | 128 __ B(hs, &ok); |
125 PredictableCodeSizeScope predictable(masm_, | 129 PredictableCodeSizeScope predictable(masm_, |
126 Assembler::kCallSizeWithRelocation); | 130 Assembler::kCallSizeWithRelocation); |
127 __ Call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); | 131 __ Call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); |
128 __ Bind(&ok); | 132 __ Bind(&ok); |
129 } | 133 } |
130 | 134 |
131 | 135 |
132 // Generate code for a JS function. On entry to the function the receiver | 136 // Generate code for a JS function. On entry to the function the receiver |
133 // and arguments have been pushed on the stack left to right. The actual | 137 // and arguments have been pushed on the stack left to right. The actual |
(...skipping 4852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4986 return previous_; | 4990 return previous_; |
4987 } | 4991 } |
4988 | 4992 |
4989 | 4993 |
4990 #undef __ | 4994 #undef __ |
4991 | 4995 |
4992 | 4996 |
4993 } } // namespace v8::internal | 4997 } } // namespace v8::internal |
4994 | 4998 |
4995 #endif // V8_TARGET_ARCH_ARM64 | 4999 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |