| OLD | NEW |
| 1 // Copyright (c) 2012, 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" |
| (...skipping 3291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3302 reinterpret_cast<SquareRootDoubleCode>(test->entry())(kDoubleConst); | 3302 reinterpret_cast<SquareRootDoubleCode>(test->entry())(kDoubleConst); |
| 3303 EXPECT_FLOAT_EQ(sqrt(kDoubleConst), res, 0.0001); | 3303 EXPECT_FLOAT_EQ(sqrt(kDoubleConst), res, 0.0001); |
| 3304 } | 3304 } |
| 3305 | 3305 |
| 3306 | 3306 |
| 3307 // Called from assembler_test.cc. | 3307 // Called from assembler_test.cc. |
| 3308 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { | 3308 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) { |
| 3309 __ pushq(PP); // Save caller's pool pointer and load a new one here. | 3309 __ pushq(PP); // Save caller's pool pointer and load a new one here. |
| 3310 __ LoadPoolPointer(); | 3310 __ LoadPoolPointer(); |
| 3311 __ pushq(THR); | 3311 __ pushq(THR); |
| 3312 __ movq(THR, CallingConventions::kArg4Reg); | 3312 __ movq(THR, CallingConventions::kArg3Reg); |
| 3313 __ pushq(CTX); | 3313 __ StoreIntoObject(CallingConventions::kArg2Reg, |
| 3314 __ movq(CTX, CallingConventions::kArg1Reg); | 3314 FieldAddress(CallingConventions::kArg2Reg, |
| 3315 __ StoreIntoObject(CallingConventions::kArg3Reg, | |
| 3316 FieldAddress(CallingConventions::kArg3Reg, | |
| 3317 GrowableObjectArray::data_offset()), | 3315 GrowableObjectArray::data_offset()), |
| 3318 CallingConventions::kArg2Reg); | 3316 CallingConventions::kArg1Reg); |
| 3319 __ popq(CTX); | |
| 3320 __ popq(THR); | 3317 __ popq(THR); |
| 3321 __ popq(PP); // Restore caller's pool pointer. | 3318 __ popq(PP); // Restore caller's pool pointer. |
| 3322 __ ret(); | 3319 __ ret(); |
| 3323 } | 3320 } |
| 3324 | 3321 |
| 3325 | 3322 |
| 3326 ASSEMBLER_TEST_GENERATE(DoubleFPUStackMoves, assembler) { | 3323 ASSEMBLER_TEST_GENERATE(DoubleFPUStackMoves, assembler) { |
| 3327 int64_t l = bit_cast<int64_t, double>(1024.67); | 3324 int64_t l = bit_cast<int64_t, double>(1024.67); |
| 3328 __ movq(RAX, Immediate(l)); | 3325 __ movq(RAX, Immediate(l)); |
| 3329 __ pushq(RAX); | 3326 __ pushq(RAX); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3642 EXPECT_EQ(ICData::kInt64RangeBit, range_of(Integer::New(kMaxInt64))); | 3639 EXPECT_EQ(ICData::kInt64RangeBit, range_of(Integer::New(kMaxInt64))); |
| 3643 EXPECT_EQ(ICData::kInt64RangeBit, range_of(Integer::New(kMinInt64))); | 3640 EXPECT_EQ(ICData::kInt64RangeBit, range_of(Integer::New(kMinInt64))); |
| 3644 | 3641 |
| 3645 EXPECT_EQ(0, range_of(Bool::True().raw())); | 3642 EXPECT_EQ(0, range_of(Bool::True().raw())); |
| 3646 } | 3643 } |
| 3647 | 3644 |
| 3648 | 3645 |
| 3649 } // namespace dart | 3646 } // namespace dart |
| 3650 | 3647 |
| 3651 #endif // defined TARGET_ARCH_X64 | 3648 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |