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

Side by Side 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, 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/intermediate_language_dbc.cc ('k') | no next file » | 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 #include <setjmp.h> // NOLINT 5 #include <setjmp.h> // NOLINT
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_DBC) 9 #if defined(TARGET_ARCH_DBC)
10 10
(...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 Exit(thread, FP, SP + 2, pc); 2041 Exit(thread, FP, SP + 2, pc);
2042 NativeArguments args(thread, 1, SP + 1, SP); 2042 NativeArguments args(thread, 1, SP + 1, SP);
2043 INVOKE_RUNTIME(DRT_NonBoolTypeError, args); 2043 INVOKE_RUNTIME(DRT_NonBoolTypeError, args);
2044 } 2044 }
2045 2045
2046 AssertBooleanOk: 2046 AssertBooleanOk:
2047 DISPATCH(); 2047 DISPATCH();
2048 } 2048 }
2049 2049
2050 { 2050 {
2051 BYTECODE(TestSmi, A_D);
2052 intptr_t left = reinterpret_cast<intptr_t>(RAW_CAST(Smi, FP[rA]));
2053 intptr_t right = reinterpret_cast<intptr_t>(RAW_CAST(Smi, FP[rD]));
2054 if ((left & right) != 0) {
2055 pc++;
2056 }
2057 DISPATCH();
2058 }
2059
2060 {
2051 BYTECODE(CheckSmi, 0); 2061 BYTECODE(CheckSmi, 0);
2052 intptr_t obj = reinterpret_cast<intptr_t>(FP[rA]); 2062 intptr_t obj = reinterpret_cast<intptr_t>(FP[rA]);
2053 if ((obj & kSmiTagMask) == kSmiTag) { 2063 if ((obj & kSmiTagMask) == kSmiTag) {
2054 pc++; 2064 pc++;
2055 } 2065 }
2056 DISPATCH(); 2066 DISPATCH();
2057 } 2067 }
2058 2068
2059 { 2069 {
2060 BYTECODE(CheckClassId, A_D); 2070 BYTECODE(CheckClassId, A_D);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 special_[kExceptionSpecialIndex] = raw_exception; 2454 special_[kExceptionSpecialIndex] = raw_exception;
2445 special_[kStacktraceSpecialIndex] = raw_stacktrace; 2455 special_[kStacktraceSpecialIndex] = raw_stacktrace;
2446 buf->Longjmp(); 2456 buf->Longjmp();
2447 UNREACHABLE(); 2457 UNREACHABLE();
2448 } 2458 }
2449 2459
2450 } // namespace dart 2460 } // namespace dart
2451 2461
2452 2462
2453 #endif // defined TARGET_ARCH_DBC 2463 #endif // defined TARGET_ARCH_DBC
OLDNEW
« 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