| 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 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 | 1243 |
| 1244 ASSEMBLER_TEST_RUN(LargeConstant, test) { | 1244 ASSEMBLER_TEST_RUN(LargeConstant, test) { |
| 1245 typedef int64_t (*LargeConstantCode)(); | 1245 typedef int64_t (*LargeConstantCode)(); |
| 1246 EXPECT_EQ(kLargeConstant, | 1246 EXPECT_EQ(kLargeConstant, |
| 1247 reinterpret_cast<LargeConstantCode>(test->entry())()); | 1247 reinterpret_cast<LargeConstantCode>(test->entry())()); |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 | 1250 |
| 1251 static int ComputeStackSpaceReservation(int needed, int fixed) { | 1251 static int ComputeStackSpaceReservation(int needed, int fixed) { |
| 1252 static const int kFrameAlignment = OS::ActivationFrameAlignment(); | 1252 static const int kFrameAlignment = OS::ActivationFrameAlignment(); |
| 1253 return (kFrameAlignment > 0) | 1253 return (kFrameAlignment > 1) |
| 1254 ? Utils::RoundUp(needed + fixed, kFrameAlignment) - fixed | 1254 ? Utils::RoundUp(needed + fixed, kFrameAlignment) - fixed |
| 1255 : needed; | 1255 : needed; |
| 1256 } | 1256 } |
| 1257 | 1257 |
| 1258 | 1258 |
| 1259 static int LeafReturn42() { | 1259 static int LeafReturn42() { |
| 1260 return 42; | 1260 return 42; |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 | 1263 |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2610 EXPECT_EQ(1, res); // Greater equal. | 2610 EXPECT_EQ(1, res); // Greater equal. |
| 2611 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(5, 5); | 2611 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(5, 5); |
| 2612 EXPECT_EQ(1, res); // Greater equal. | 2612 EXPECT_EQ(1, res); // Greater equal. |
| 2613 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(2, 5); | 2613 res = reinterpret_cast<ConditionalMovesCompareCode>(test->entry())(2, 5); |
| 2614 EXPECT_EQ(-1, res); // Less. | 2614 EXPECT_EQ(-1, res); // Less. |
| 2615 } | 2615 } |
| 2616 | 2616 |
| 2617 } // namespace dart | 2617 } // namespace dart |
| 2618 | 2618 |
| 2619 #endif // defined TARGET_ARCH_X64 | 2619 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |