OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "vm/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/os.h" | 9 #include "vm/os.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
11 #include "vm/virtual_memory.h" | 11 #include "vm/virtual_memory.h" |
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 } | 1298 } |
1299 | 1299 |
1300 | 1300 |
1301 ASSEMBLER_TEST_RUN(SquareRootDouble, entry) { | 1301 ASSEMBLER_TEST_RUN(SquareRootDouble, entry) { |
1302 typedef double (*SquareRootDoubleCode)(double d); | 1302 typedef double (*SquareRootDoubleCode)(double d); |
1303 const double kDoubleConst = .7; | 1303 const double kDoubleConst = .7; |
1304 double res = reinterpret_cast<SquareRootDoubleCode>(entry)(kDoubleConst); | 1304 double res = reinterpret_cast<SquareRootDoubleCode>(entry)(kDoubleConst); |
1305 EXPECT_FLOAT_EQ(sqrt(kDoubleConst), res, 0.0001); | 1305 EXPECT_FLOAT_EQ(sqrt(kDoubleConst), res, 0.0001); |
1306 } | 1306 } |
1307 | 1307 |
| 1308 |
| 1309 // Called from assembler_test.cc. |
| 1310 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
| 1311 __ pushq(CTX); |
| 1312 __ movq(CTX, RDI); |
| 1313 __ StoreIntoObject(RDX, |
| 1314 FieldAddress(RDX, GrowableObjectArray::data_offset()), |
| 1315 RSI); |
| 1316 __ popq(CTX); |
| 1317 __ ret(); |
| 1318 } |
| 1319 |
1308 } // namespace dart | 1320 } // namespace dart |
1309 | 1321 |
1310 #endif // defined TARGET_ARCH_X64 | 1322 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |