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

Unified Diff: runtime/vm/simulator_dbc.cc

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/intermediate_language_dbc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 3e813fa164e83de306b2e20d13209c6ba66b7e19..b1c648dc96d9e61026a30e3c64623a54b7d7c0e8 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -2048,6 +2048,16 @@ RawObject* Simulator::Call(const Code& code,
}
{
+ BYTECODE(TestSmi, A_D);
+ intptr_t left = reinterpret_cast<intptr_t>(RAW_CAST(Smi, FP[rA]));
+ intptr_t right = reinterpret_cast<intptr_t>(RAW_CAST(Smi, FP[rD]));
+ if ((left & right) != 0) {
+ pc++;
+ }
+ DISPATCH();
+ }
+
+ {
BYTECODE(CheckSmi, 0);
intptr_t obj = reinterpret_cast<intptr_t>(FP[rA]);
if ((obj & kSmiTagMask) == kSmiTag) {
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698