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

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

Issue 15874005: Fixes buggy FPU tests for MIPS hardware. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/simulator_mips.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) 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 VM_UNIT_TEST_H_ 5 #ifndef VM_UNIT_TEST_H_
6 #define VM_UNIT_TEST_H_ 6 #define VM_UNIT_TEST_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "vm/ast.h" 10 #include "vm/ast.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 #define EXECUTE_TEST_CODE_INT32(name, entry) \ 147 #define EXECUTE_TEST_CODE_INT32(name, entry) \
148 static_cast<int32_t>(Simulator::Current()->Call( \ 148 static_cast<int32_t>(Simulator::Current()->Call( \
149 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0)) 149 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0))
150 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \ 150 #define EXECUTE_TEST_CODE_INT64_LL(name, entry, long_arg0, long_arg1) \
151 static_cast<int64_t>(Simulator::Current()->Call( \ 151 static_cast<int64_t>(Simulator::Current()->Call( \
152 bit_cast<int32_t, uword>(entry), \ 152 bit_cast<int32_t, uword>(entry), \
153 Utils::Low32Bits(long_arg0), \ 153 Utils::Low32Bits(long_arg0), \
154 Utils::High32Bits(long_arg0), \ 154 Utils::High32Bits(long_arg0), \
155 Utils::Low32Bits(long_arg1), \ 155 Utils::Low32Bits(long_arg1), \
156 Utils::High32Bits(long_arg1))) 156 Utils::High32Bits(long_arg1)))
157 #if defined(TARGET_ARCH_MIPS)
158 #define EXECUTE_TEST_CODE_FLOAT(name, entry) \
159 bit_cast<float, int32_t>(Simulator::Current()->Call( \
160 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0, true))
161 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) \
162 bit_cast<double, int64_t>(Simulator::Current()->Call( \
163 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0, true))
164 #else // defined(TARGET_ARCH_MIPS)
157 #define EXECUTE_TEST_CODE_FLOAT(name, entry) \ 165 #define EXECUTE_TEST_CODE_FLOAT(name, entry) \
158 bit_cast<float, int32_t>(Simulator::Current()->Call( \ 166 bit_cast<float, int32_t>(Simulator::Current()->Call( \
159 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0)) 167 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0))
160 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) \ 168 #define EXECUTE_TEST_CODE_DOUBLE(name, entry) \
161 bit_cast<double, int64_t>(Simulator::Current()->Call( \ 169 bit_cast<double, int64_t>(Simulator::Current()->Call( \
162 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0)) 170 bit_cast<int32_t, uword>(entry), 0, 0, 0, 0))
171 #endif // defined(TARGET_ARCH_MIPS)
163 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \ 172 #define EXECUTE_TEST_CODE_INT32_F(name, entry, float_arg) \
164 static_cast<int32_t>(Simulator::Current()->Call( \ 173 static_cast<int32_t>(Simulator::Current()->Call( \
165 bit_cast<int32_t, uword>(entry), \ 174 bit_cast<int32_t, uword>(entry), \
166 bit_cast<int32_t, float>(float_arg), \ 175 bit_cast<int32_t, float>(float_arg), \
167 0, 0, 0)) 176 0, 0, 0))
168 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \ 177 #define EXECUTE_TEST_CODE_INT32_D(name, entry, double_arg) \
169 static_cast<int32_t>(Simulator::Current()->Call( \ 178 static_cast<int32_t>(Simulator::Current()->Call( \
170 bit_cast<int32_t, uword>(entry), \ 179 bit_cast<int32_t, uword>(entry), \
171 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \ 180 Utils::Low32Bits(bit_cast<int64_t, double>(double_arg)), \
172 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), \ 181 Utils::High32Bits(bit_cast<int64_t, double>(double_arg)), \
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 } \ 391 } \
383 } else { \ 392 } else { \
384 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \ 393 dart::Expect(__FILE__, __LINE__).Fail("expected True, but was '%s'\n", \
385 #handle); \ 394 #handle); \
386 } \ 395 } \
387 } while (0) 396 } while (0)
388 397
389 } // namespace dart 398 } // namespace dart
390 399
391 #endif // VM_UNIT_TEST_H_ 400 #endif // VM_UNIT_TEST_H_
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698