OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
9 | 9 |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 __ LoadImmediate(T7, reinterpret_cast<int32_t>(Object::null())); | 172 __ LoadImmediate(T7, reinterpret_cast<int32_t>(Object::null())); |
173 __ Ret(); | 173 __ Ret(); |
174 __ delay_slot()->mov(V0, T7); | 174 __ delay_slot()->mov(V0, T7); |
175 __ Bind(&fall_through); | 175 __ Bind(&fall_through); |
176 } | 176 } |
177 | 177 |
178 | 178 |
179 #define TYPED_ARRAY_ALLOCATION(type_name, cid, max_len, scale_shift) \ | 179 #define TYPED_ARRAY_ALLOCATION(type_name, cid, max_len, scale_shift) \ |
180 Label fall_through; \ | 180 Label fall_through; \ |
181 const intptr_t kArrayLengthStackOffset = 0 * kWordSize; \ | 181 const intptr_t kArrayLengthStackOffset = 0 * kWordSize; \ |
| 182 __ MaybeTraceAllocation(cid, T2, &fall_through); \ |
182 __ lw(T2, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \ | 183 __ lw(T2, Address(SP, kArrayLengthStackOffset)); /* Array length. */ \ |
183 /* Check that length is a positive Smi. */ \ | 184 /* Check that length is a positive Smi. */ \ |
184 /* T2: requested array length argument. */ \ | 185 /* T2: requested array length argument. */ \ |
185 __ andi(CMPRES1, T2, Immediate(kSmiTagMask)); \ | 186 __ andi(CMPRES1, T2, Immediate(kSmiTagMask)); \ |
186 __ bne(CMPRES1, ZR, &fall_through); \ | 187 __ bne(CMPRES1, ZR, &fall_through); \ |
187 __ BranchSignedLess(T2, Immediate(0), &fall_through); \ | 188 __ BranchSignedLess(T2, Immediate(0), &fall_through); \ |
188 __ SmiUntag(T2); \ | 189 __ SmiUntag(T2); \ |
189 /* Check for maximum allowed length. */ \ | 190 /* Check for maximum allowed length. */ \ |
190 /* T2: untagged array length. */ \ | 191 /* T2: untagged array length. */ \ |
191 __ BranchSignedGreater(T2, Immediate(max_len), &fall_through); \ | 192 __ BranchSignedGreater(T2, Immediate(max_len), &fall_through); \ |
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2168 Isolate* isolate = Isolate::Current(); | 2169 Isolate* isolate = Isolate::Current(); |
2169 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); | 2170 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); |
2170 // Set return value. | 2171 // Set return value. |
2171 __ Ret(); | 2172 __ Ret(); |
2172 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); | 2173 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); |
2173 } | 2174 } |
2174 | 2175 |
2175 } // namespace dart | 2176 } // namespace dart |
2176 | 2177 |
2177 #endif // defined TARGET_ARCH_MIPS | 2178 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |