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

Side by Side Diff: src/arm/simulator-arm.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/disasm-arm.cc ('k') | src/arm64/simulator-arm64.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <stdarg.h> 5 #include <stdarg.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <cmath> 7 #include <cmath>
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 2902 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 rm_val = (rm_val >> 16) | (rm_val << 16); 2913 rm_val = (rm_val >> 16) | (rm_val << 16);
2914 break; 2914 break;
2915 case 3: 2915 case 3:
2916 rm_val = (rm_val >> 24) | (rm_val << 8); 2916 rm_val = (rm_val >> 24) | (rm_val << 8);
2917 break; 2917 break;
2918 } 2918 }
2919 set_register(rd, rn_val + (rm_val & 0xFFFF)); 2919 set_register(rd, rn_val + (rm_val & 0xFFFF));
2920 } 2920 }
2921 } 2921 }
2922 } else { 2922 } else {
2923 UNIMPLEMENTED(); 2923 // PU == 0b01, BW == 0b11, Bits(9, 6) != 0b0001
2924 if ((instr->Bits(20, 16) == 0x1f) &&
2925 (instr->Bits(11, 4) == 0xf3)) {
2926 // Rbit.
2927 uint32_t rm_val = get_register(instr->RmValue());
2928 set_register(rd, base::bits::ReverseBits(rm_val));
2929 } else {
2930 UNIMPLEMENTED();
2931 }
2924 } 2932 }
2925 break; 2933 break;
2926 } 2934 }
2927 } 2935 }
2928 return; 2936 return;
2929 } 2937 }
2930 break; 2938 break;
2931 } 2939 }
2932 case db_x: { 2940 case db_x: {
2933 if (instr->Bits(22, 20) == 0x5) { 2941 if (instr->Bits(22, 20) == 0x5) {
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
4215 set_register(sp, current_sp + sizeof(uintptr_t)); 4223 set_register(sp, current_sp + sizeof(uintptr_t));
4216 return address; 4224 return address;
4217 } 4225 }
4218 4226
4219 } // namespace internal 4227 } // namespace internal
4220 } // namespace v8 4228 } // namespace v8
4221 4229
4222 #endif // USE_SIMULATOR 4230 #endif // USE_SIMULATOR
4223 4231
4224 #endif // V8_TARGET_ARCH_ARM 4232 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | src/arm64/simulator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698