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

Side by Side Diff: test/cctest/compiler/test-run-machops.cc

Issue 2755373002: [arm64] The ubfx instruction can be used with a mask-width=64 (Closed)
Patch Set: Created 3 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
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.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 2014 the V8 project authors. All rights reserved. Use of this 1 // Copyright 2014 the V8 project authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 #include <functional> 6 #include <functional>
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 6728 matching lines...) Expand 10 before | Expand all | Expand 10 after
6739 CHECK_EQ(input, m.Call(input)); 6739 CHECK_EQ(input, m.Call(input));
6740 } 6740 }
6741 6741
6742 TEST(Regression6046a) { 6742 TEST(Regression6046a) {
6743 BufferedRawMachineAssemblerTester<int64_t> m; 6743 BufferedRawMachineAssemblerTester<int64_t> m;
6744 m.Return(m.Word64Shr(m.Word64And(m.Int64Constant(0), m.Int64Constant(0)), 6744 m.Return(m.Word64Shr(m.Word64And(m.Int64Constant(0), m.Int64Constant(0)),
6745 m.Int64Constant(64))); 6745 m.Int64Constant(64)));
6746 CHECK_EQ(0, m.Call()); 6746 CHECK_EQ(0, m.Call());
6747 } 6747 }
6748 6748
6749 TEST(Regression6122) {
6750 BufferedRawMachineAssemblerTester<int64_t> m;
6751 m.Return(m.Word64Shr(m.Word64And(m.Int64Constant(59), m.Int64Constant(-1)),
6752 m.Int64Constant(0)));
6753 CHECK_EQ(59, m.Call());
6754 }
6755
6756 #endif // V8_TARGET_ARCH_64_BIT
6757
6749 TEST(Regression6046b) { 6758 TEST(Regression6046b) {
6750 BufferedRawMachineAssemblerTester<int32_t> m; 6759 BufferedRawMachineAssemblerTester<int32_t> m;
6751 m.Return(m.Word32Shr(m.Word32And(m.Int32Constant(0), m.Int32Constant(0)), 6760 m.Return(m.Word32Shr(m.Word32And(m.Int32Constant(0), m.Int32Constant(0)),
6752 m.Int32Constant(32))); 6761 m.Int32Constant(32)));
6753 CHECK_EQ(0, m.Call()); 6762 CHECK_EQ(0, m.Call());
6754 } 6763 }
6755 6764
6756 #endif // V8_TARGET_ARCH_64_BIT 6765 TEST(Regression6122b) {
6766 BufferedRawMachineAssemblerTester<int32_t> m;
6767 m.Return(m.Word32Shr(m.Word32And(m.Int32Constant(59), m.Int32Constant(-1)),
6768 m.Int32Constant(0)));
6769 CHECK_EQ(59, m.Call());
6770 }
6757 6771
6758 TEST(Regression6028) { 6772 TEST(Regression6028) {
6759 BufferedRawMachineAssemblerTester<int32_t> m; 6773 BufferedRawMachineAssemblerTester<int32_t> m;
6760 m.Return(m.Word32Equal( 6774 m.Return(m.Word32Equal(
6761 m.Word32And(m.Int32Constant(0x23), 6775 m.Word32And(m.Int32Constant(0x23),
6762 m.Word32Sar(m.Int32Constant(1), m.Int32Constant(18))), 6776 m.Word32Sar(m.Int32Constant(1), m.Int32Constant(18))),
6763 m.Int32Constant(0))); 6777 m.Int32Constant(0)));
6764 CHECK_EQ(1, m.Call()); 6778 CHECK_EQ(1, m.Call());
6765 } 6779 }
6766 6780
6767 } // namespace compiler 6781 } // namespace compiler
6768 } // namespace internal 6782 } // namespace internal
6769 } // namespace v8 6783 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698