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

Unified 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, 6 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constants_dbc.h
diff --git a/runtime/vm/constants_dbc.h b/runtime/vm/constants_dbc.h
index 597dd8cfa27fff5936da4aaf133e35d21a580c58..5d901b8c8febf157af6b199296f1ee3a0fd1b735 100644
--- a/runtime/vm/constants_dbc.h
+++ b/runtime/vm/constants_dbc.h
@@ -371,6 +371,11 @@ namespace dart {
//
// Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0).
//
+// - TestSmi rA, rD
+//
+// If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD]
+// must be Smis.
+//
// - CheckSmi rA
//
// If FP[rA] is a Smi, then skip the next instruction.
@@ -541,6 +546,7 @@ namespace dart {
V(InstanceOf, A, num, ___, ___) \
V(AssertAssignable, D, num, lit, ___) \
V(AssertBoolean, A, num, ___, ___) \
+ V(TestSmi, A_D, reg, reg, ___) \
V(CheckSmi, A, reg, ___, ___) \
V(CheckClassId, A_D, reg, num, ___) \
V(CheckDenseSwitch, A_D, reg, num, ___) \
@@ -662,7 +668,11 @@ enum FpuRegister {
const FpuRegister FpuTMP = kFakeFpuRegister;
const intptr_t kNumberOfFpuRegisters = 1;
-enum Condition { EQ, NE };
+// After a comparison, the condition NEXT_IS_TRUE means the following
+// instruction is executed if the comparision is true and skipped over overwise.
+// Conidition NEXT_IS_FALSE means the following instruction is executed if the
+// comparison is false and skipped over otherwise.
+enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE };
} // namespace dart
« 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