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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 1424173006: Implemented the Word64Popcnt TurboFan operator for x64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/test-run-machops.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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3249 matching lines...) Expand 10 before | Expand all | Expand 10 after
3260 void MacroAssembler::Popcntl(Register dst, const Operand& src) { 3260 void MacroAssembler::Popcntl(Register dst, const Operand& src) {
3261 if (CpuFeatures::IsSupported(POPCNT)) { 3261 if (CpuFeatures::IsSupported(POPCNT)) {
3262 CpuFeatureScope scope(this, POPCNT); 3262 CpuFeatureScope scope(this, POPCNT);
3263 popcntl(dst, src); 3263 popcntl(dst, src);
3264 return; 3264 return;
3265 } 3265 }
3266 UNREACHABLE(); 3266 UNREACHABLE();
3267 } 3267 }
3268 3268
3269 3269
3270 void MacroAssembler::Popcntq(Register dst, Register src) {
3271 if (CpuFeatures::IsSupported(POPCNT)) {
3272 CpuFeatureScope scope(this, POPCNT);
3273 popcntq(dst, src);
3274 return;
3275 }
3276 UNREACHABLE();
3277 }
3278
3279
3280 void MacroAssembler::Popcntq(Register dst, const Operand& src) {
3281 if (CpuFeatures::IsSupported(POPCNT)) {
3282 CpuFeatureScope scope(this, POPCNT);
3283 popcntq(dst, src);
3284 return;
3285 }
3286 UNREACHABLE();
3287 }
3288
3289
3270 void MacroAssembler::Pushad() { 3290 void MacroAssembler::Pushad() {
3271 Push(rax); 3291 Push(rax);
3272 Push(rcx); 3292 Push(rcx);
3273 Push(rdx); 3293 Push(rdx);
3274 Push(rbx); 3294 Push(rbx);
3275 // Not pushing rsp or rbp. 3295 // Not pushing rsp or rbp.
3276 Push(rsi); 3296 Push(rsi);
3277 Push(rdi); 3297 Push(rdi);
3278 Push(r8); 3298 Push(r8);
3279 Push(r9); 3299 Push(r9);
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
5432 movl(rax, dividend); 5452 movl(rax, dividend);
5433 shrl(rax, Immediate(31)); 5453 shrl(rax, Immediate(31));
5434 addl(rdx, rax); 5454 addl(rdx, rax);
5435 } 5455 }
5436 5456
5437 5457
5438 } // namespace internal 5458 } // namespace internal
5439 } // namespace v8 5459 } // namespace v8
5440 5460
5441 #endif // V8_TARGET_ARCH_X64 5461 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698