| OLD | NEW |
| 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 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3318 CHECK_EQ(end_position, pc_offset()); | 3318 CHECK_EQ(end_position, pc_offset()); |
| 3319 #endif | 3319 #endif |
| 3320 } | 3320 } |
| 3321 | 3321 |
| 3322 | 3322 |
| 3323 void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) { | 3323 void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) { |
| 3324 if (imm8 == 0) { | 3324 if (imm8 == 0) { |
| 3325 Movd(dst, src); | 3325 Movd(dst, src); |
| 3326 return; | 3326 return; |
| 3327 } | 3327 } |
| 3328 DCHECK_EQ(1, imm8); | |
| 3329 if (CpuFeatures::IsSupported(SSE4_1)) { | 3328 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 3330 CpuFeatureScope sse_scope(this, SSE4_1); | 3329 CpuFeatureScope sse_scope(this, SSE4_1); |
| 3331 pextrd(dst, src, imm8); | 3330 pextrd(dst, src, imm8); |
| 3332 return; | 3331 return; |
| 3333 } | 3332 } |
| 3333 DCHECK_EQ(1, imm8); |
| 3334 movq(dst, src); | 3334 movq(dst, src); |
| 3335 shrq(dst, Immediate(32)); | 3335 shrq(dst, Immediate(32)); |
| 3336 } | 3336 } |
| 3337 | 3337 |
| 3338 | 3338 |
| 3339 void MacroAssembler::Pinsrd(XMMRegister dst, Register src, int8_t imm8) { | 3339 void MacroAssembler::Pinsrd(XMMRegister dst, Register src, int8_t imm8) { |
| 3340 if (CpuFeatures::IsSupported(SSE4_1)) { | 3340 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 3341 CpuFeatureScope sse_scope(this, SSE4_1); | 3341 CpuFeatureScope sse_scope(this, SSE4_1); |
| 3342 pinsrd(dst, src, imm8); | 3342 pinsrd(dst, src, imm8); |
| 3343 return; | 3343 return; |
| (...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5823 movl(rax, dividend); | 5823 movl(rax, dividend); |
| 5824 shrl(rax, Immediate(31)); | 5824 shrl(rax, Immediate(31)); |
| 5825 addl(rdx, rax); | 5825 addl(rdx, rax); |
| 5826 } | 5826 } |
| 5827 | 5827 |
| 5828 | 5828 |
| 5829 } // namespace internal | 5829 } // namespace internal |
| 5830 } // namespace v8 | 5830 } // namespace v8 |
| 5831 | 5831 |
| 5832 #endif // V8_TARGET_ARCH_X64 | 5832 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |