| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ARM64_SIMULATOR_ARM64_H_ | 5 #ifndef V8_ARM64_SIMULATOR_ARM64_H_ |
| 6 #define V8_ARM64_SIMULATOR_ARM64_H_ | 6 #define V8_ARM64_SIMULATOR_ARM64_H_ |
| 7 | 7 |
| 8 #include <stdarg.h> | 8 #include <stdarg.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 Isolate* isolate); | 204 Isolate* isolate); |
| 205 | 205 |
| 206 // A wrapper class that stores an argument for one of the above Call | 206 // A wrapper class that stores an argument for one of the above Call |
| 207 // functions. | 207 // functions. |
| 208 // | 208 // |
| 209 // Only arguments up to 64 bits in size are supported. | 209 // Only arguments up to 64 bits in size are supported. |
| 210 class CallArgument { | 210 class CallArgument { |
| 211 public: | 211 public: |
| 212 template<typename T> | 212 template<typename T> |
| 213 explicit CallArgument(T argument) { | 213 explicit CallArgument(T argument) { |
| 214 bits_ = 0; |
| 214 ASSERT(sizeof(argument) <= sizeof(bits_)); | 215 ASSERT(sizeof(argument) <= sizeof(bits_)); |
| 215 memcpy(&bits_, &argument, sizeof(argument)); | 216 memcpy(&bits_, &argument, sizeof(argument)); |
| 216 type_ = X_ARG; | 217 type_ = X_ARG; |
| 217 } | 218 } |
| 218 | 219 |
| 219 explicit CallArgument(double argument) { | 220 explicit CallArgument(double argument) { |
| 220 ASSERT(sizeof(argument) == sizeof(bits_)); | 221 ASSERT(sizeof(argument) == sizeof(bits_)); |
| 221 memcpy(&bits_, &argument, sizeof(argument)); | 222 memcpy(&bits_, &argument, sizeof(argument)); |
| 222 type_ = D_ARG; | 223 type_ = D_ARG; |
| 223 } | 224 } |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 static void UnregisterCTryCatch() { | 829 static void UnregisterCTryCatch() { |
| 829 Simulator::current(Isolate::Current())->PopAddress(); | 830 Simulator::current(Isolate::Current())->PopAddress(); |
| 830 } | 831 } |
| 831 }; | 832 }; |
| 832 | 833 |
| 833 #endif // !defined(USE_SIMULATOR) | 834 #endif // !defined(USE_SIMULATOR) |
| 834 | 835 |
| 835 } } // namespace v8::internal | 836 } } // namespace v8::internal |
| 836 | 837 |
| 837 #endif // V8_ARM64_SIMULATOR_ARM64_H_ | 838 #endif // V8_ARM64_SIMULATOR_ARM64_H_ |
| OLD | NEW |