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

Side by Side Diff: runtime/vm/simulator_arm64.cc

Issue 1341623002: Add missing arity check for native entry in arm64 and mips simulators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/native_entry.cc ('k') | runtime/vm/simulator_mips.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64) 9 #if defined(TARGET_ARCH_ARM64)
10 10
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 const double d2 = bit_cast<double, int64_t>(get_vregisterd(V2, 0)); 1619 const double d2 = bit_cast<double, int64_t>(get_vregisterd(V2, 0));
1620 const double d3 = bit_cast<double, int64_t>(get_vregisterd(V3, 0)); 1620 const double d3 = bit_cast<double, int64_t>(get_vregisterd(V3, 0));
1621 const double d4 = bit_cast<double, int64_t>(get_vregisterd(V4, 0)); 1621 const double d4 = bit_cast<double, int64_t>(get_vregisterd(V4, 0));
1622 const double d5 = bit_cast<double, int64_t>(get_vregisterd(V5, 0)); 1622 const double d5 = bit_cast<double, int64_t>(get_vregisterd(V5, 0));
1623 const double d6 = bit_cast<double, int64_t>(get_vregisterd(V6, 0)); 1623 const double d6 = bit_cast<double, int64_t>(get_vregisterd(V6, 0));
1624 const double d7 = bit_cast<double, int64_t>(get_vregisterd(V7, 0)); 1624 const double d7 = bit_cast<double, int64_t>(get_vregisterd(V7, 0));
1625 const double res = target(d0, d1, d2, d3, d4, d5, d6, d7); 1625 const double res = target(d0, d1, d2, d3, d4, d5, d6, d7);
1626 set_vregisterd(V0, 0, bit_cast<int64_t, double>(res)); 1626 set_vregisterd(V0, 0, bit_cast<int64_t, double>(res));
1627 set_vregisterd(V0, 1, 0); 1627 set_vregisterd(V0, 1, 0);
1628 } else if (redirection->call_kind() == kBootstrapNativeCall) { 1628 } else if (redirection->call_kind() == kBootstrapNativeCall) {
1629 ASSERT(redirection->argument_count() == 1);
1629 NativeArguments* arguments; 1630 NativeArguments* arguments;
1630 arguments = reinterpret_cast<NativeArguments*>(get_register(R0)); 1631 arguments = reinterpret_cast<NativeArguments*>(get_register(R0));
1631 SimulatorBootstrapNativeCall target = 1632 SimulatorBootstrapNativeCall target =
1632 reinterpret_cast<SimulatorBootstrapNativeCall>(external); 1633 reinterpret_cast<SimulatorBootstrapNativeCall>(external);
1633 target(arguments); 1634 target(arguments);
1634 // Zap result register from void function. 1635 // Zap result register from void function.
1635 set_register(instr, R0, icount_); 1636 set_register(instr, R0, icount_);
1636 } else { 1637 } else {
1637 ASSERT(redirection->call_kind() == kNativeCall); 1638 ASSERT(redirection->call_kind() == kNativeCall);
1638 NativeArguments* arguments; 1639 NativeArguments* arguments;
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
3535 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); 3536 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception));
3536 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); 3537 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace));
3537 buf->Longjmp(); 3538 buf->Longjmp();
3538 } 3539 }
3539 3540
3540 } // namespace dart 3541 } // namespace dart
3541 3542
3542 #endif // !defined(USING_SIMULATOR) 3543 #endif // !defined(USING_SIMULATOR)
3543 3544
3544 #endif // defined TARGET_ARCH_ARM64 3545 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698