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

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 2747103002: [ia32] Add minps/maxps and AVX v_ps/v_pd for add/sub/mul/div/min/max (Closed)
Patch Set: Created 3 years, 9 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/ia32/assembler-ia32.h ('k') | src/ia32/disasm-ia32.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 } 2254 }
2255 2255
2256 2256
2257 void Assembler::divps(XMMRegister dst, const Operand& src) { 2257 void Assembler::divps(XMMRegister dst, const Operand& src) {
2258 EnsureSpace ensure_space(this); 2258 EnsureSpace ensure_space(this);
2259 EMIT(0x0F); 2259 EMIT(0x0F);
2260 EMIT(0x5E); 2260 EMIT(0x5E);
2261 emit_sse_operand(dst, src); 2261 emit_sse_operand(dst, src);
2262 } 2262 }
2263 2263
2264 void Assembler::minps(XMMRegister dst, const Operand& src) {
2265 EnsureSpace ensure_space(this);
2266 EMIT(0x0F);
2267 EMIT(0x5D);
2268 emit_sse_operand(dst, src);
2269 }
2270
2271 void Assembler::maxps(XMMRegister dst, const Operand& src) {
2272 EnsureSpace ensure_space(this);
2273 EMIT(0x0F);
2274 EMIT(0x5F);
2275 emit_sse_operand(dst, src);
2276 }
2264 2277
2265 void Assembler::sqrtsd(XMMRegister dst, const Operand& src) { 2278 void Assembler::sqrtsd(XMMRegister dst, const Operand& src) {
2266 EnsureSpace ensure_space(this); 2279 EnsureSpace ensure_space(this);
2267 EMIT(0xF2); 2280 EMIT(0xF2);
2268 EMIT(0x0F); 2281 EMIT(0x0F);
2269 EMIT(0x51); 2282 EMIT(0x51);
2270 emit_sse_operand(dst, src); 2283 emit_sse_operand(dst, src);
2271 } 2284 }
2272 2285
2273 2286
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 DCHECK(IsEnabled(FMA3)); 2765 DCHECK(IsEnabled(FMA3));
2753 EnsureSpace ensure_space(this); 2766 EnsureSpace ensure_space(this);
2754 emit_vex_prefix(src1, kLIG, k66, k0F38, kW0); 2767 emit_vex_prefix(src1, kLIG, k66, k0F38, kW0);
2755 EMIT(op); 2768 EMIT(op);
2756 emit_sse_operand(dst, src2); 2769 emit_sse_operand(dst, src2);
2757 } 2770 }
2758 2771
2759 2772
2760 void Assembler::vsd(byte op, XMMRegister dst, XMMRegister src1, 2773 void Assembler::vsd(byte op, XMMRegister dst, XMMRegister src1,
2761 const Operand& src2) { 2774 const Operand& src2) {
2762 DCHECK(IsEnabled(AVX)); 2775 vinstr(op, dst, src1, src2, kF2, k0F, kWIG);
2763 EnsureSpace ensure_space(this);
2764 emit_vex_prefix(src1, kLIG, kF2, k0F, kWIG);
2765 EMIT(op);
2766 emit_sse_operand(dst, src2);
2767 } 2776 }
2768 2777
2769 2778
2770 void Assembler::vss(byte op, XMMRegister dst, XMMRegister src1, 2779 void Assembler::vss(byte op, XMMRegister dst, XMMRegister src1,
2771 const Operand& src2) { 2780 const Operand& src2) {
2772 DCHECK(IsEnabled(AVX)); 2781 vinstr(op, dst, src1, src2, kF3, k0F, kWIG);
2773 EnsureSpace ensure_space(this);
2774 emit_vex_prefix(src1, kLIG, kF3, k0F, kWIG);
2775 EMIT(op);
2776 emit_sse_operand(dst, src2);
2777 } 2782 }
2778 2783
2779 2784
2780 void Assembler::vps(byte op, XMMRegister dst, XMMRegister src1, 2785 void Assembler::vps(byte op, XMMRegister dst, XMMRegister src1,
2781 const Operand& src2) { 2786 const Operand& src2) {
2782 DCHECK(IsEnabled(AVX)); 2787 vinstr(op, dst, src1, src2, kNone, k0F, kWIG);
2783 EnsureSpace ensure_space(this);
2784 emit_vex_prefix(src1, kL128, kNone, k0F, kWIG);
2785 EMIT(op);
2786 emit_sse_operand(dst, src2);
2787 } 2788 }
2788 2789
2789 2790
2790 void Assembler::vpd(byte op, XMMRegister dst, XMMRegister src1, 2791 void Assembler::vpd(byte op, XMMRegister dst, XMMRegister src1,
2791 const Operand& src2) { 2792 const Operand& src2) {
2792 DCHECK(IsEnabled(AVX)); 2793 vinstr(op, dst, src1, src2, k66, k0F, kWIG);
2793 EnsureSpace ensure_space(this);
2794 emit_vex_prefix(src1, kL128, k66, k0F, kWIG);
2795 EMIT(op);
2796 emit_sse_operand(dst, src2);
2797 } 2794 }
2798 2795
2799 void Assembler::vpsllw(XMMRegister dst, XMMRegister src, int8_t imm8) { 2796 void Assembler::vpsllw(XMMRegister dst, XMMRegister src, int8_t imm8) {
2800 XMMRegister iop = {6}; 2797 XMMRegister iop = {6};
2801 vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG); 2798 vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG);
2802 EMIT(imm8); 2799 EMIT(imm8);
2803 } 2800 }
2804 2801
2805 void Assembler::vpslld(XMMRegister dst, XMMRegister src, int8_t imm8) { 2802 void Assembler::vpslld(XMMRegister dst, XMMRegister src, int8_t imm8) {
2806 XMMRegister iop = {6}; 2803 XMMRegister iop = {6};
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 } 3118 }
3122 RelocInfo rinfo(isolate(), pc_, rmode, data, NULL); 3119 RelocInfo rinfo(isolate(), pc_, rmode, data, NULL);
3123 reloc_info_writer.Write(&rinfo); 3120 reloc_info_writer.Write(&rinfo);
3124 } 3121 }
3125 3122
3126 3123
3127 } // namespace internal 3124 } // namespace internal
3128 } // namespace v8 3125 } // namespace v8
3129 3126
3130 #endif // V8_TARGET_ARCH_IA32 3127 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698