OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 #ifndef VM_CONSTANTS_DBC_H_ | 5 #ifndef VM_CONSTANTS_DBC_H_ |
6 #define VM_CONSTANTS_DBC_H_ | 6 #define VM_CONSTANTS_DBC_H_ |
7 | 7 |
8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // | 224 // |
225 // FP[rA] <- FP[rB] op FP[rC]. These instructions expect their operands to be | 225 // FP[rA] <- FP[rB] op FP[rC]. These instructions expect their operands to be |
226 // Smis, but don't check that they are. | 226 // Smis, but don't check that they are. |
227 // | 227 // |
228 // - BitNot rA, rD | 228 // - BitNot rA, rD |
229 // | 229 // |
230 // FP[rA] <- ~FP[rD]. As above, assumes FP[rD] is a Smi. | 230 // FP[rA] <- ~FP[rD]. As above, assumes FP[rD] is a Smi. |
231 // | 231 // |
232 // - WriteIntoDouble rA, rD | 232 // - WriteIntoDouble rA, rD |
233 // | 233 // |
234 // Box the double in FP[rD] with the result in FP[rA]. | 234 // Box the double in FP[rD] using the box in FP[rA]. |
235 // | 235 // |
236 // - UnboxDouble rA, rD | 236 // - UnboxDouble rA, rD |
237 // | 237 // |
238 // Unbox the double in FP[rD] into FP[rA]. Assumes FP[rD] is a double. | 238 // Unbox the double in FP[rD] into FP[rA]. Assumes FP[rD] is a double. |
239 // | 239 // |
240 // - CheckedUnboxDouble rA, rD | 240 // - CheckedUnboxDouble rA, rD |
241 // | 241 // |
242 // Unboxes FP[rD] into FP[rA] and skips the following instruction unless | 242 // Unboxes FP[rD] into FP[rA] and skips the following instruction unless |
243 // FP[rD] is not a double or a Smi. When FP[rD] is a Smi, converts it to a | 243 // FP[rD] is not a double or a Smi. When FP[rD] is a Smi, converts it to a |
244 // double. | 244 // double. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 // | 302 // |
303 // Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and | 303 // Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and |
304 // unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt. | 304 // unboxed double variants DEq, DNe, DLe, DLt, DGe, DGt. |
305 // Skips the next instruction unless FP[rA] <Cond> FP[rD]. Assumes that | 305 // Skips the next instruction unless FP[rA] <Cond> FP[rD]. Assumes that |
306 // FP[rA] and FP[rD] are Smis or unboxed doubles as inidcated by <Cond>. | 306 // FP[rA] and FP[rD] are Smis or unboxed doubles as inidcated by <Cond>. |
307 // | 307 // |
308 // - CreateArrayTOS | 308 // - CreateArrayTOS |
309 // | 309 // |
310 // Allocate array of length SP[0] with type arguments SP[-1]. | 310 // Allocate array of length SP[0] with type arguments SP[-1]. |
311 // | 311 // |
| 312 // - CreateArrayOpt rA, rB, rC |
| 313 // |
| 314 // Try to allocate a new array where FP[rB] is the length, and FP[rC] is the |
| 315 // type. If allocation is successful, the result is stored in FP[rA], and |
| 316 // the next four instructions, which should be the |
| 317 // (Push type; Push length; AllocateTOS; PopLocal) slow path are skipped. |
| 318 // |
312 // - Allocate D | 319 // - Allocate D |
313 // | 320 // |
314 // Allocate object of class PP[D] with no type arguments. | 321 // Allocate object of class PP[D] with no type arguments. |
315 // | 322 // |
| 323 // - AllocateOpt rA, D |
| 324 // |
| 325 // Try allocating an object with tags in PP[D] with no type arguments. |
| 326 // If allocation is successful, the result is stored in FP[rA], and |
| 327 // the next two instructions, which should be the (Allocate class; PopLocal) |
| 328 // slow path are skipped |
| 329 // |
316 // - AllocateT | 330 // - AllocateT |
317 // | 331 // |
318 // Allocate object of class SP[0] with type arguments SP[-1]. | 332 // Allocate object of class SP[0] with type arguments SP[-1]. |
319 // | 333 // |
320 // - StoreIndexedTOS | 334 // - StoreIndexedTOS |
321 // | 335 // |
322 // Store SP[0] into array SP[-2] at index SP[-1]. No typechecking is done. | 336 // Store SP[0] into array SP[-2] at index SP[-1]. No typechecking is done. |
323 // SP[-2] is assumed to be a RawArray, SP[-1] to be a smi. | 337 // SP[-2] is assumed to be a RawArray, SP[-1] to be a smi. |
324 // | 338 // |
325 // - StoreIndexed rA, rB, rC | 339 // - StoreIndexed rA, rB, rC |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 V(IfDEq, A_D, reg, reg, ___) \ | 691 V(IfDEq, A_D, reg, reg, ___) \ |
678 V(IfDLe, A_D, reg, reg, ___) \ | 692 V(IfDLe, A_D, reg, reg, ___) \ |
679 V(IfDLt, A_D, reg, reg, ___) \ | 693 V(IfDLt, A_D, reg, reg, ___) \ |
680 V(IfDGe, A_D, reg, reg, ___) \ | 694 V(IfDGe, A_D, reg, reg, ___) \ |
681 V(IfDGt, A_D, reg, reg, ___) \ | 695 V(IfDGt, A_D, reg, reg, ___) \ |
682 V(IfNeStrictNum, A_D, reg, reg, ___) \ | 696 V(IfNeStrictNum, A_D, reg, reg, ___) \ |
683 V(IfEqStrictNum, A_D, reg, reg, ___) \ | 697 V(IfEqStrictNum, A_D, reg, reg, ___) \ |
684 V(IfEqNull, A, reg, ___, ___) \ | 698 V(IfEqNull, A, reg, ___, ___) \ |
685 V(IfNeNull, A, reg, ___, ___) \ | 699 V(IfNeNull, A, reg, ___, ___) \ |
686 V(CreateArrayTOS, 0, ___, ___, ___) \ | 700 V(CreateArrayTOS, 0, ___, ___, ___) \ |
| 701 V(CreateArrayOpt, A_B_C, reg, reg, ___) \ |
687 V(Allocate, D, lit, ___, ___) \ | 702 V(Allocate, D, lit, ___, ___) \ |
688 V(AllocateT, 0, ___, ___, ___) \ | 703 V(AllocateT, 0, ___, ___, ___) \ |
| 704 V(AllocateOpt, A_D, reg, lit, ___) \ |
689 V(StoreIndexedTOS, 0, ___, ___, ___) \ | 705 V(StoreIndexedTOS, 0, ___, ___, ___) \ |
690 V(StoreIndexed, A_B_C, reg, reg, reg) \ | 706 V(StoreIndexed, A_B_C, reg, reg, reg) \ |
691 V(StoreIndexedUint8, A_B_C, reg, reg, reg) \ | 707 V(StoreIndexedUint8, A_B_C, reg, reg, reg) \ |
692 V(StoreIndexedExternalUint8, A_B_C, reg, reg, reg) \ | 708 V(StoreIndexedExternalUint8, A_B_C, reg, reg, reg) \ |
693 V(StoreIndexedOneByteString, A_B_C, reg, reg, reg) \ | 709 V(StoreIndexedOneByteString, A_B_C, reg, reg, reg) \ |
694 V(StoreIndexedUint32, A_B_C, reg, reg, reg) \ | 710 V(StoreIndexedUint32, A_B_C, reg, reg, reg) \ |
695 V(StoreIndexedFloat64, A_B_C, reg, reg, reg) \ | 711 V(StoreIndexedFloat64, A_B_C, reg, reg, reg) \ |
696 V(StoreIndexed8Float64, A_B_C, reg, reg, reg) \ | 712 V(StoreIndexed8Float64, A_B_C, reg, reg, reg) \ |
697 V(LoadIndexed, A_B_C, reg, reg, reg) \ | 713 V(LoadIndexed, A_B_C, reg, reg, reg) \ |
698 V(LoadIndexedUint8, A_B_C, reg, reg, reg) \ | 714 V(LoadIndexedUint8, A_B_C, reg, reg, reg) \ |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 | 890 |
875 // After a comparison, the condition NEXT_IS_TRUE means the following | 891 // After a comparison, the condition NEXT_IS_TRUE means the following |
876 // instruction is executed if the comparision is true and skipped over overwise. | 892 // instruction is executed if the comparision is true and skipped over overwise. |
877 // Conidition NEXT_IS_FALSE means the following instruction is executed if the | 893 // Conidition NEXT_IS_FALSE means the following instruction is executed if the |
878 // comparison is false and skipped over otherwise. | 894 // comparison is false and skipped over otherwise. |
879 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; | 895 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE }; |
880 | 896 |
881 } // namespace dart | 897 } // namespace dart |
882 | 898 |
883 #endif // VM_CONSTANTS_DBC_H_ | 899 #endif // VM_CONSTANTS_DBC_H_ |
OLD | NEW |