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

Side by Side Diff: test/unittests/base/bits-unittest.cc

Issue 654653004: [arm] Drop SMMLS support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
« no previous file with comments | « test/cctest/test-disasm-arm.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. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits> 5 #include <limits>
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/macros.h" 8 #include "src/base/macros.h"
9 #include "testing/gtest-support.h" 9 #include "testing/gtest-support.h"
10 10
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 TEST(Bits, SignedMulHighAndAdd32) { 217 TEST(Bits, SignedMulHighAndAdd32) {
218 TRACED_FORRANGE(int32_t, i, 1, 50) { 218 TRACED_FORRANGE(int32_t, i, 1, 50) {
219 EXPECT_EQ(i, SignedMulHighAndAdd32(0, 0, i)); 219 EXPECT_EQ(i, SignedMulHighAndAdd32(0, 0, i));
220 TRACED_FORRANGE(int32_t, j, 1, i) { 220 TRACED_FORRANGE(int32_t, j, 1, i) {
221 EXPECT_EQ(i, SignedMulHighAndAdd32(j, j, i)); 221 EXPECT_EQ(i, SignedMulHighAndAdd32(j, j, i));
222 } 222 }
223 EXPECT_EQ(i + 1, SignedMulHighAndAdd32(1024 * 1024 * 1024, 4, i)); 223 EXPECT_EQ(i + 1, SignedMulHighAndAdd32(1024 * 1024 * 1024, 4, i));
224 } 224 }
225 } 225 }
226 226
227
228 TEST(Bits, SignedMulHighAndSub32) {
229 TRACED_FORRANGE(int32_t, i, 1, 50) {
230 EXPECT_EQ(i, SignedMulHighAndSub32(0, 0, i));
231 TRACED_FORRANGE(int32_t, j, 1, i) {
232 EXPECT_EQ(i, SignedMulHighAndSub32(j, j, i));
233 }
234 EXPECT_EQ(i - 1, SignedMulHighAndSub32(1024 * 1024 * 1024, 4, i));
235 }
236 }
237
238 } // namespace bits 227 } // namespace bits
239 } // namespace base 228 } // namespace base
240 } // namespace v8 229 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698