| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2271 } | 2271 } |
| 2272 } | 2272 } |
| 2273 } | 2273 } |
| 2274 | 2274 |
| 2275 | 2275 |
| 2276 void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) { | 2276 void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) { |
| 2277 if (imm8 == 0) { | 2277 if (imm8 == 0) { |
| 2278 movd(dst, src); | 2278 movd(dst, src); |
| 2279 return; | 2279 return; |
| 2280 } | 2280 } |
| 2281 DCHECK_EQ(1, imm8); | |
| 2282 if (CpuFeatures::IsSupported(SSE4_1)) { | 2281 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 2283 CpuFeatureScope sse_scope(this, SSE4_1); | 2282 CpuFeatureScope sse_scope(this, SSE4_1); |
| 2284 pextrd(dst, src, imm8); | 2283 pextrd(dst, src, imm8); |
| 2285 return; | 2284 return; |
| 2286 } | 2285 } |
| 2286 DCHECK_EQ(1, imm8); |
| 2287 pshufd(xmm0, src, 1); | 2287 pshufd(xmm0, src, 1); |
| 2288 movd(dst, xmm0); | 2288 movd(dst, xmm0); |
| 2289 } | 2289 } |
| 2290 | 2290 |
| 2291 | 2291 |
| 2292 void MacroAssembler::Pinsrd(XMMRegister dst, const Operand& src, int8_t imm8) { | 2292 void MacroAssembler::Pinsrd(XMMRegister dst, const Operand& src, int8_t imm8) { |
| 2293 DCHECK(imm8 == 0 || imm8 == 1); | |
| 2294 if (CpuFeatures::IsSupported(SSE4_1)) { | 2293 if (CpuFeatures::IsSupported(SSE4_1)) { |
| 2295 CpuFeatureScope sse_scope(this, SSE4_1); | 2294 CpuFeatureScope sse_scope(this, SSE4_1); |
| 2296 pinsrd(dst, src, imm8); | 2295 pinsrd(dst, src, imm8); |
| 2297 return; | 2296 return; |
| 2298 } | 2297 } |
| 2299 movd(xmm0, src); | 2298 movd(xmm0, src); |
| 2300 if (imm8 == 1) { | 2299 if (imm8 == 1) { |
| 2301 punpckldq(dst, xmm0); | 2300 punpckldq(dst, xmm0); |
| 2302 } else { | 2301 } else { |
| 2303 DCHECK_EQ(0, imm8); | 2302 DCHECK_EQ(0, imm8); |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2931 mov(eax, dividend); | 2930 mov(eax, dividend); |
| 2932 shr(eax, 31); | 2931 shr(eax, 31); |
| 2933 add(edx, eax); | 2932 add(edx, eax); |
| 2934 } | 2933 } |
| 2935 | 2934 |
| 2936 | 2935 |
| 2937 } // namespace internal | 2936 } // namespace internal |
| 2938 } // namespace v8 | 2937 } // namespace v8 |
| 2939 | 2938 |
| 2940 #endif // V8_TARGET_ARCH_IA32 | 2939 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |