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

Side by Side Diff: runtime/vm/assembler_x64_test.cc

Issue 12438032: Use shorter write-barrier filtering sequence when value is known to be non-smi. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
OLDNEW
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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 } 2018 }
2019 2019
2020 2020
2021 ASSEMBLER_TEST_RUN(TestNot, test) { 2021 ASSEMBLER_TEST_RUN(TestNot, test) {
2022 typedef int (*TestNot)(); 2022 typedef int (*TestNot)();
2023 unsigned int res = reinterpret_cast<TestNot>(test->entry())(); 2023 unsigned int res = reinterpret_cast<TestNot>(test->entry())();
2024 EXPECT_EQ(0xFFFFFFFF, res); 2024 EXPECT_EQ(0xFFFFFFFF, res);
2025 } 2025 }
2026 2026
2027 2027
2028 ASSEMBLER_TEST_GENERATE(TestNotInt32, assembler) {
2029 __ movq(RAX, Immediate(0x0));
2030 __ notl(RAX);
2031 __ ret();
2032 }
2033
2034
2035 ASSEMBLER_TEST_RUN(TestNotInt32, test) {
2036 typedef int (*TestNot)();
2037 unsigned int res = reinterpret_cast<TestNot>(test->entry())();
2038 EXPECT_EQ(0xFFFFFFFF, res);
2039 }
2040
2041
2028 ASSEMBLER_TEST_GENERATE(XorpdZeroing, assembler) { 2042 ASSEMBLER_TEST_GENERATE(XorpdZeroing, assembler) {
2029 __ pushq(RAX); 2043 __ pushq(RAX);
2030 __ movsd(Address(RSP, 0), XMM0); 2044 __ movsd(Address(RSP, 0), XMM0);
2031 __ xorpd(XMM0, Address(RSP, 0)); 2045 __ xorpd(XMM0, Address(RSP, 0));
2032 __ popq(RAX); 2046 __ popq(RAX);
2033 __ ret(); 2047 __ ret();
2034 } 2048 }
2035 2049
2036 2050
2037 ASSEMBLER_TEST_RUN(XorpdZeroing, test) { 2051 ASSEMBLER_TEST_RUN(XorpdZeroing, test) {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2239 EXPECT_EQ(0, res); 2253 EXPECT_EQ(0, res);
2240 res = reinterpret_cast<ExtractSignBits>(test->entry())(-1.0); 2254 res = reinterpret_cast<ExtractSignBits>(test->entry())(-1.0);
2241 EXPECT_EQ(1, res); 2255 EXPECT_EQ(1, res);
2242 res = reinterpret_cast<ExtractSignBits>(test->entry())(-0.0); 2256 res = reinterpret_cast<ExtractSignBits>(test->entry())(-0.0);
2243 EXPECT_EQ(1, res); 2257 EXPECT_EQ(1, res);
2244 } 2258 }
2245 2259
2246 } // namespace dart 2260 } // namespace dart
2247 2261
2248 #endif // defined TARGET_ARCH_X64 2262 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698