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

Side by Side Diff: src/arm64/simulator-arm64.cc

Issue 1698483002: [arm][arm64] Improve CountTrailingZero implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 4 years, 10 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/arm/simulator-arm.cc ('k') | src/arm64/utils-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <stdlib.h> 5 #include <stdlib.h>
6 #include <cmath> 6 #include <cmath>
7 #include <cstdarg> 7 #include <cstdarg>
8 8
9 #if V8_TARGET_ARCH_ARM64 9 #if V8_TARGET_ARCH_ARM64
10 10
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 } 1989 }
1990 } 1990 }
1991 1991
1992 1992
1993 void Simulator::VisitDataProcessing1Source(Instruction* instr) { 1993 void Simulator::VisitDataProcessing1Source(Instruction* instr) {
1994 unsigned dst = instr->Rd(); 1994 unsigned dst = instr->Rd();
1995 unsigned src = instr->Rn(); 1995 unsigned src = instr->Rn();
1996 1996
1997 switch (instr->Mask(DataProcessing1SourceMask)) { 1997 switch (instr->Mask(DataProcessing1SourceMask)) {
1998 case RBIT_w: 1998 case RBIT_w:
1999 set_wreg(dst, ReverseBits(wreg(src))); 1999 set_wreg(dst, base::bits::ReverseBits(wreg(src)));
2000 break; 2000 break;
2001 case RBIT_x: 2001 case RBIT_x:
2002 set_xreg(dst, ReverseBits(xreg(src))); 2002 set_xreg(dst, base::bits::ReverseBits(xreg(src)));
2003 break; 2003 break;
2004 case REV16_w: 2004 case REV16_w:
2005 set_wreg(dst, ReverseBytes(wreg(src), 1)); 2005 set_wreg(dst, ReverseBytes(wreg(src), 1));
2006 break; 2006 break;
2007 case REV16_x: 2007 case REV16_x:
2008 set_xreg(dst, ReverseBytes(xreg(src), 1)); 2008 set_xreg(dst, ReverseBytes(xreg(src), 1));
2009 break; 2009 break;
2010 case REV_w: 2010 case REV_w:
2011 set_wreg(dst, ReverseBytes(wreg(src), 2)); 2011 set_wreg(dst, ReverseBytes(wreg(src), 2));
2012 break; 2012 break;
(...skipping 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
3868 delete[] format; 3868 delete[] format;
3869 } 3869 }
3870 3870
3871 3871
3872 #endif // USE_SIMULATOR 3872 #endif // USE_SIMULATOR
3873 3873
3874 } // namespace internal 3874 } // namespace internal
3875 } // namespace v8 3875 } // namespace v8
3876 3876
3877 #endif // V8_TARGET_ARCH_ARM64 3877 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/simulator-arm.cc ('k') | src/arm64/utils-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698