Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: runtime/vm/constants_dbc.h

Issue 2113523002: DBC: Implement TestSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_dbc_test.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // 364 //
365 // - AssertAssignable D 365 // - AssertAssignable D
366 // 366 //
367 // Assert that SP[-3] is assignable to variable named SP[0] of type 367 // Assert that SP[-3] is assignable to variable named SP[0] of type
368 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D]. 368 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D].
369 // 369 //
370 // - AssertBoolean A 370 // - AssertBoolean A
371 // 371 //
372 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). 372 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0).
373 // 373 //
374 // - TestSmi rA, rD
375 //
376 // If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD]
377 // must be Smis.
378 //
374 // - CheckSmi rA 379 // - CheckSmi rA
375 // 380 //
376 // If FP[rA] is a Smi, then skip the next instruction. 381 // If FP[rA] is a Smi, then skip the next instruction.
377 // 382 //
378 // - CheckClassId rA, D 383 // - CheckClassId rA, D
379 // 384 //
380 // If the object at FP[rA]'s class id matches the class id D, then skip the 385 // If the object at FP[rA]'s class id matches the class id D, then skip the
381 // following instruction. 386 // following instruction.
382 // 387 //
383 // - CheckDenseSwitch rA, D 388 // - CheckDenseSwitch rA, D
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 V(Frame, D, num, ___, ___) \ 539 V(Frame, D, num, ___, ___) \
535 V(SetFrame, A, num, ___, num) \ 540 V(SetFrame, A, num, ___, num) \
536 V(AllocateContext, D, num, ___, ___) \ 541 V(AllocateContext, D, num, ___, ___) \
537 V(CloneContext, 0, ___, ___, ___) \ 542 V(CloneContext, 0, ___, ___, ___) \
538 V(MoveSpecial, A_D, reg, num, ___) \ 543 V(MoveSpecial, A_D, reg, num, ___) \
539 V(InstantiateType, D, lit, ___, ___) \ 544 V(InstantiateType, D, lit, ___, ___) \
540 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ 545 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \
541 V(InstanceOf, A, num, ___, ___) \ 546 V(InstanceOf, A, num, ___, ___) \
542 V(AssertAssignable, D, num, lit, ___) \ 547 V(AssertAssignable, D, num, lit, ___) \
543 V(AssertBoolean, A, num, ___, ___) \ 548 V(AssertBoolean, A, num, ___, ___) \
549 V(TestSmi, A_D, reg, reg, ___) \
544 V(CheckSmi, A, reg, ___, ___) \ 550 V(CheckSmi, A, reg, ___, ___) \
545 V(CheckClassId, A_D, reg, num, ___) \ 551 V(CheckClassId, A_D, reg, num, ___) \
546 V(CheckDenseSwitch, A_D, reg, num, ___) \ 552 V(CheckDenseSwitch, A_D, reg, num, ___) \
547 V(CheckCids, A_B_C, reg, num, ___) \ 553 V(CheckCids, A_B_C, reg, num, ___) \
548 V(CheckStack, 0, ___, ___, ___) \ 554 V(CheckStack, 0, ___, ___, ___) \
549 V(DebugStep, 0, ___, ___, ___) \ 555 V(DebugStep, 0, ___, ___, ___) \
550 V(DebugBreak, A, num, ___, ___) \ 556 V(DebugBreak, A, num, ___, ___) \
551 V(Deopt, A_D, num, num, ___) \ 557 V(Deopt, A_D, num, num, ___) \
552 558
553 typedef uint32_t Instr; 559 typedef uint32_t Instr;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 const intptr_t CTX = 0; 661 const intptr_t CTX = 0;
656 662
657 enum FpuRegister { 663 enum FpuRegister {
658 kNoFpuRegister = -1, 664 kNoFpuRegister = -1,
659 kFakeFpuRegister, 665 kFakeFpuRegister,
660 kNumberOfDummyFpuRegisters, 666 kNumberOfDummyFpuRegisters,
661 }; 667 };
662 const FpuRegister FpuTMP = kFakeFpuRegister; 668 const FpuRegister FpuTMP = kFakeFpuRegister;
663 const intptr_t kNumberOfFpuRegisters = 1; 669 const intptr_t kNumberOfFpuRegisters = 1;
664 670
665 enum Condition { EQ, NE }; 671 // After a comparison, the condition NEXT_IS_TRUE means the following
672 // instruction is executed if the comparision is true and skipped over overwise.
673 // Conidition NEXT_IS_FALSE means the following instruction is executed if the
674 // comparison is false and skipped over otherwise.
675 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE };
666 676
667 } // namespace dart 677 } // namespace dart
668 678
669 #endif // VM_CONSTANTS_DBC_H_ 679 #endif // VM_CONSTANTS_DBC_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_dbc_test.cc ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698