| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // | 149 // |
| 150 // - InstanceCall<N> ArgC, D; InstanceCall<N>Opt ArgC, D | 150 // - InstanceCall<N> ArgC, D; InstanceCall<N>Opt ArgC, D |
| 151 // | 151 // |
| 152 // Lookup and invoke method with N checked arguments using ICData in PP[D] | 152 // Lookup and invoke method with N checked arguments using ICData in PP[D] |
| 153 // with arguments SP[-(1+ArgC)], ..., SP[-1]. | 153 // with arguments SP[-(1+ArgC)], ..., SP[-1]. |
| 154 // | 154 // |
| 155 // - NativeCall, NativeBootstrapCall | 155 // - NativeCall, NativeBootstrapCall |
| 156 // | 156 // |
| 157 // Invoke native function SP[-1] with argc_tag SP[0]. | 157 // Invoke native function SP[-1] with argc_tag SP[0]. |
| 158 // | 158 // |
| 159 // - OneByteStringFromCharCode rA, rX |
| 160 // |
| 161 // Load the one-character symbol with the char code given by the Smi |
| 162 // in FP[rX] into FP[rA]. |
| 163 // |
| 164 // - StringToCharCode rA, rX |
| 165 // |
| 166 // Load and smi-encode the single char code of the string in FP[rX] into |
| 167 // FP[rA]. If the string's length is not 1, load smi -1 instead. |
| 168 // |
| 159 // - AddTOS; SubTOS; MulTOS; BitOrTOS; BitAndTOS; EqualTOS; LessThanTOS; | 169 // - AddTOS; SubTOS; MulTOS; BitOrTOS; BitAndTOS; EqualTOS; LessThanTOS; |
| 160 // GreaterThanTOS; | 170 // GreaterThanTOS; |
| 161 // | 171 // |
| 162 // Smi fast-path for a corresponding method. Checks if SP[0] and SP[-1] are | 172 // Smi fast-path for a corresponding method. Checks if SP[0] and SP[-1] are |
| 163 // both smis and result of SP[0] <op> SP[-1] is a smi - if this is true | 173 // both smis and result of SP[0] <op> SP[-1] is a smi - if this is true |
| 164 // then pops operands and pushes result on the stack and skips the next | 174 // then pops operands and pushes result on the stack and skips the next |
| 165 // instruction (which implements a slow path fallback). | 175 // instruction (which implements a slow path fallback). |
| 166 // | 176 // |
| 167 // - Add, Sub, Mul, Div, Mod, Shl, Shr rA, rB, rC | 177 // - Add, Sub, Mul, Div, Mod, Shl, Shr rA, rB, rC |
| 168 // | 178 // |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 V(PushConstant, D, lit, ___, ___) \ | 455 V(PushConstant, D, lit, ___, ___) \ |
| 446 V(StoreLocal, X, xeg, ___, ___) \ | 456 V(StoreLocal, X, xeg, ___, ___) \ |
| 447 V(PopLocal, X, xeg, ___, ___) \ | 457 V(PopLocal, X, xeg, ___, ___) \ |
| 448 V(StaticCall, A_D, num, num, ___) \ | 458 V(StaticCall, A_D, num, num, ___) \ |
| 449 V(InstanceCall1, A_D, num, num, ___) \ | 459 V(InstanceCall1, A_D, num, num, ___) \ |
| 450 V(InstanceCall2, A_D, num, num, ___) \ | 460 V(InstanceCall2, A_D, num, num, ___) \ |
| 451 V(InstanceCall1Opt, A_D, num, num, ___) \ | 461 V(InstanceCall1Opt, A_D, num, num, ___) \ |
| 452 V(InstanceCall2Opt, A_D, num, num, ___) \ | 462 V(InstanceCall2Opt, A_D, num, num, ___) \ |
| 453 V(NativeCall, 0, ___, ___, ___) \ | 463 V(NativeCall, 0, ___, ___, ___) \ |
| 454 V(NativeBootstrapCall, 0, ___, ___, ___) \ | 464 V(NativeBootstrapCall, 0, ___, ___, ___) \ |
| 465 V(OneByteStringFromCharCode, A_X, reg, xeg, ___) \ |
| 466 V(StringToCharCode, A_X, reg, xeg, ___) \ |
| 455 V(AddTOS, 0, ___, ___, ___) \ | 467 V(AddTOS, 0, ___, ___, ___) \ |
| 456 V(SubTOS, 0, ___, ___, ___) \ | 468 V(SubTOS, 0, ___, ___, ___) \ |
| 457 V(MulTOS, 0, ___, ___, ___) \ | 469 V(MulTOS, 0, ___, ___, ___) \ |
| 458 V(BitOrTOS, 0, ___, ___, ___) \ | 470 V(BitOrTOS, 0, ___, ___, ___) \ |
| 459 V(BitAndTOS, 0, ___, ___, ___) \ | 471 V(BitAndTOS, 0, ___, ___, ___) \ |
| 460 V(EqualTOS, 0, ___, ___, ___) \ | 472 V(EqualTOS, 0, ___, ___, ___) \ |
| 461 V(LessThanTOS, 0, ___, ___, ___) \ | 473 V(LessThanTOS, 0, ___, ___, ___) \ |
| 462 V(GreaterThanTOS, 0, ___, ___, ___) \ | 474 V(GreaterThanTOS, 0, ___, ___, ___) \ |
| 463 V(Add, A_B_C, reg, reg, reg) \ | 475 V(Add, A_B_C, reg, reg, reg) \ |
| 464 V(Sub, A_B_C, reg, reg, reg) \ | 476 V(Sub, A_B_C, reg, reg, reg) \ |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 kNumberOfDummyFpuRegisters, | 637 kNumberOfDummyFpuRegisters, |
| 626 }; | 638 }; |
| 627 const FpuRegister FpuTMP = kFakeFpuRegister; | 639 const FpuRegister FpuTMP = kFakeFpuRegister; |
| 628 const intptr_t kNumberOfFpuRegisters = 1; | 640 const intptr_t kNumberOfFpuRegisters = 1; |
| 629 | 641 |
| 630 enum Condition { EQ, NE }; | 642 enum Condition { EQ, NE }; |
| 631 | 643 |
| 632 } // namespace dart | 644 } // namespace dart |
| 633 | 645 |
| 634 #endif // VM_CONSTANTS_DBC_H_ | 646 #endif // VM_CONSTANTS_DBC_H_ |
| OLD | NEW |