| 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 2722 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2733 void MacroAssembler::Ucomisd(XMMRegister src1, const Operand& src2) { |  2733 void MacroAssembler::Ucomisd(XMMRegister src1, const Operand& src2) { | 
|  2734   if (CpuFeatures::IsSupported(AVX)) { |  2734   if (CpuFeatures::IsSupported(AVX)) { | 
|  2735     CpuFeatureScope scope(this, AVX); |  2735     CpuFeatureScope scope(this, AVX); | 
|  2736     vucomisd(src1, src2); |  2736     vucomisd(src1, src2); | 
|  2737   } else { |  2737   } else { | 
|  2738     ucomisd(src1, src2); |  2738     ucomisd(src1, src2); | 
|  2739   } |  2739   } | 
|  2740 } |  2740 } | 
|  2741  |  2741  | 
|  2742  |  2742  | 
|  2743 void MacroAssembler::Andpd(XMMRegister dst, XMMRegister src) { |  | 
|  2744   if (CpuFeatures::IsSupported(AVX)) { |  | 
|  2745     CpuFeatureScope scope(this, AVX); |  | 
|  2746     vandpd(dst, dst, src); |  | 
|  2747   } else { |  | 
|  2748     andpd(dst, src); |  | 
|  2749   } |  | 
|  2750 } |  | 
|  2751  |  | 
|  2752  |  | 
|  2753 void MacroAssembler::Orpd(XMMRegister dst, XMMRegister src) { |  | 
|  2754   if (CpuFeatures::IsSupported(AVX)) { |  | 
|  2755     CpuFeatureScope scope(this, AVX); |  | 
|  2756     vorpd(dst, dst, src); |  | 
|  2757   } else { |  | 
|  2758     orpd(dst, src); |  | 
|  2759   } |  | 
|  2760 } |  | 
|  2761  |  | 
|  2762  |  | 
|  2763 void MacroAssembler::Xorpd(XMMRegister dst, XMMRegister src) { |  | 
|  2764   if (CpuFeatures::IsSupported(AVX)) { |  | 
|  2765     CpuFeatureScope scope(this, AVX); |  | 
|  2766     vxorpd(dst, dst, src); |  | 
|  2767   } else { |  | 
|  2768     xorpd(dst, src); |  | 
|  2769   } |  | 
|  2770 } |  | 
|  2771  |  | 
|  2772  |  | 
|  2773 void MacroAssembler::Pcmpeqd(XMMRegister dst, XMMRegister src) { |  | 
|  2774   if (CpuFeatures::IsSupported(AVX)) { |  | 
|  2775     CpuFeatureScope scope(this, AVX); |  | 
|  2776     vpcmpeqd(dst, dst, src); |  | 
|  2777   } else { |  | 
|  2778     pcmpeqd(dst, src); |  | 
|  2779   } |  | 
|  2780 } |  | 
|  2781  |  | 
|  2782  |  | 
|  2783 void MacroAssembler::Psllq(XMMRegister dst, byte imm8) { |  | 
|  2784   if (CpuFeatures::IsSupported(AVX)) { |  | 
|  2785     CpuFeatureScope scope(this, AVX); |  | 
|  2786     vpsllq(dst, dst, imm8); |  | 
|  2787   } else { |  | 
|  2788     psllq(dst, imm8); |  | 
|  2789   } |  | 
|  2790 } |  | 
|  2791  |  | 
|  2792  |  | 
|  2793 void MacroAssembler::Psrlq(XMMRegister dst, byte imm8) { |  | 
|  2794   if (CpuFeatures::IsSupported(AVX)) { |  | 
|  2795     CpuFeatureScope scope(this, AVX); |  | 
|  2796     vpsrlq(dst, dst, imm8); |  | 
|  2797   } else { |  | 
|  2798     psrlq(dst, imm8); |  | 
|  2799   } |  | 
|  2800 } |  | 
|  2801  |  | 
|  2802  |  | 
|  2803 void MacroAssembler::Cmp(Register dst, Handle<Object> source) { |  2743 void MacroAssembler::Cmp(Register dst, Handle<Object> source) { | 
|  2804   AllowDeferredHandleDereference smi_check; |  2744   AllowDeferredHandleDereference smi_check; | 
|  2805   if (source->IsSmi()) { |  2745   if (source->IsSmi()) { | 
|  2806     Cmp(dst, Smi::cast(*source)); |  2746     Cmp(dst, Smi::cast(*source)); | 
|  2807   } else { |  2747   } else { | 
|  2808     MoveHeapObject(kScratchRegister, source); |  2748     MoveHeapObject(kScratchRegister, source); | 
|  2809     cmpp(dst, kScratchRegister); |  2749     cmpp(dst, kScratchRegister); | 
|  2810   } |  2750   } | 
|  2811 } |  2751 } | 
|  2812  |  2752  | 
| (...skipping 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5410   movl(rax, dividend); |  5350   movl(rax, dividend); | 
|  5411   shrl(rax, Immediate(31)); |  5351   shrl(rax, Immediate(31)); | 
|  5412   addl(rdx, rax); |  5352   addl(rdx, rax); | 
|  5413 } |  5353 } | 
|  5414  |  5354  | 
|  5415  |  5355  | 
|  5416 }  // namespace internal |  5356 }  // namespace internal | 
|  5417 }  // namespace v8 |  5357 }  // namespace v8 | 
|  5418  |  5358  | 
|  5419 #endif  // V8_TARGET_ARCH_X64 |  5359 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW |