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

Side by Side Diff: runtime/vm/unit_test.h

Issue 2858623002: Remove MIPS support (Closed)
Patch Set: Rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef RUNTIME_VM_UNIT_TEST_H_ 5 #ifndef RUNTIME_VM_UNIT_TEST_H_
6 #define RUNTIME_VM_UNIT_TEST_H_ 6 #define RUNTIME_VM_UNIT_TEST_H_
7 7
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 9
10 #include "platform/globals.h" 10 #include "platform/globals.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 static void CodeGenTestRun##name1(const Function& function) { \ 155 static void CodeGenTestRun##name1(const Function& function) { \
156 Object& result = Object::Handle(); \ 156 Object& result = Object::Handle(); \
157 result = DartEntry::InvokeFunction(function, Object::empty_array()); \ 157 result = DartEntry::InvokeFunction(function, Object::empty_array()); \
158 EXPECT(!result.IsError()); \ 158 EXPECT(!result.IsError()); \
159 Instance& actual = Instance::Handle(); \ 159 Instance& actual = Instance::Handle(); \
160 actual ^= result.raw(); \ 160 actual ^= result.raw(); \
161 EXPECT(actual.CanonicalizeEquals(Instance::Handle(expected))); \ 161 EXPECT(actual.CanonicalizeEquals(Instance::Handle(expected))); \
162 } 162 }
163 163
164 164
165 #if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS) || \ 165 #if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_ARM64)
166 defined(TARGET_ARCH_ARM64) 166 #if defined(HOST_ARCH_ARM) || defined(HOST_ARCH_ARM64)
167 #if defined(HOST_ARCH_ARM) || defined(HOST_ARCH_MIPS) || \
168 defined(HOST_ARCH_ARM64)
169 // Running on actual ARM or MIPS hardware, execute code natively. 167 // Running on actual ARM or MIPS hardware, execute code natively.
170 #define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)() 168 #define EXECUTE_TEST_CODE_INT32(name, entry) reinterpret_cast<name>(entry)()
171 #define EXECUTE_TEST_CODE_INT64(name, entry) reinterpret_cast<name>(entry)() 169 #define EXECUTE_TEST_CODE_INT64(name, entry) reinterpret_cast<name>(entry)()
172 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ 170 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \
173 reinterpret_cast<name>(entry)(long_arg0, long_arg1) 171 reinterpret_cast<name>(entry)(long_arg0, long_arg1)
174 #define EXECUTE_TEST_CODE_FLOAT(name, entry) reinterpret_cast<name>(entry)() 172 #define EXECUTE_TEST_CODE_FLOAT(name, entry) reinterpret_cast<name>(entry)()
175 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) reinterpret_cast<name>(entry)() 173 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) reinterpret_cast<name>(entry)()
176 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \ 174 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \
177 reinterpret_cast<name>(entry)(float_arg) 175 reinterpret_cast<name>(entry)(float_arg)
178 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ 176 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \ 223 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \
226 static_cast<int32_t>(Simulator::Current()->Call( \ 224 static_cast<int32_t>(Simulator::Current()->Call( \
227 bit_cast<int32_t, uword>(entry), bit_cast<int32_t, float>(float_arg), 0, \ 225 bit_cast<int32_t, uword>(entry), bit_cast<int32_t, float>(float_arg), 0, \
228 0, 0, false, true)) 226 0, 0, false, true))
229 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ 227 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \
230 static_cast<int32_t>(Simulator::Current()->Call( \ 228 static_cast<int32_t>(Simulator::Current()->Call( \
231 bit_cast<int32_t, uword>(entry), \ 229 bit_cast<int32_t, uword>(entry), \
232 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \ 230 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \
233 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), 0, 0, false, \ 231 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), 0, 0, false, \
234 true)) 232 true))
235 #endif // defined(HOST_ARCH_ARM) || defined(HOST_ARCH_MIPS) 233 #endif // defined(HOST_ARCH_ARM)
236 #endif // defined(TARGET_ARCH_{ARM, ARM64, MIPS}) 234 #endif // defined(TARGET_ARCH_{ARM, ARM64, MIPS})
237 235
238 236
239 inline Dart_Handle NewString(const char* str) { 237 inline Dart_Handle NewString(const char* str) {
240 return Dart_NewStringFromCString(str); 238 return Dart_NewStringFromCString(str);
241 } 239 }
242 240
243 241
244 namespace dart { 242 namespace dart {
245 243
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 ~SetFlagScope() { *flag_ = original_value_; } 641 ~SetFlagScope() { *flag_ = original_value_; }
644 642
645 private: 643 private:
646 T* flag_; 644 T* flag_;
647 T original_value_; 645 T original_value_;
648 }; 646 };
649 647
650 } // namespace dart 648 } // namespace dart
651 649
652 #endif // RUNTIME_VM_UNIT_TEST_H_ 650 #endif // RUNTIME_VM_UNIT_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698