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

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

Issue 2744643004: [ia32] Add some SSE2, SSE4 instructions and AVX version for SIMD (Closed)
Patch Set: Move punpckldq/punpckhdq to LIST 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 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 2334
2335 2335
2336 void Assembler::movmskps(Register dst, XMMRegister src) { 2336 void Assembler::movmskps(Register dst, XMMRegister src) {
2337 EnsureSpace ensure_space(this); 2337 EnsureSpace ensure_space(this);
2338 EMIT(0x0F); 2338 EMIT(0x0F);
2339 EMIT(0x50); 2339 EMIT(0x50);
2340 emit_sse_operand(dst, src); 2340 emit_sse_operand(dst, src);
2341 } 2341 }
2342 2342
2343 2343
2344 void Assembler::pcmpeqd(XMMRegister dst, XMMRegister src) {
2345 EnsureSpace ensure_space(this);
2346 EMIT(0x66);
2347 EMIT(0x0F);
2348 EMIT(0x76);
2349 emit_sse_operand(dst, src);
2350 }
2351
2352
2353 void Assembler::punpckldq(XMMRegister dst, XMMRegister src) {
2354 EnsureSpace ensure_space(this);
2355 EMIT(0x66);
2356 EMIT(0x0F);
2357 EMIT(0x62);
2358 emit_sse_operand(dst, src);
2359 }
2360
2361
2362 void Assembler::punpckhdq(XMMRegister dst, XMMRegister src) {
2363 EnsureSpace ensure_space(this);
2364 EMIT(0x66);
2365 EMIT(0x0F);
2366 EMIT(0x6A);
2367 emit_sse_operand(dst, src);
2368 }
2369
2370
2371 void Assembler::maxsd(XMMRegister dst, const Operand& src) { 2344 void Assembler::maxsd(XMMRegister dst, const Operand& src) {
2372 EnsureSpace ensure_space(this); 2345 EnsureSpace ensure_space(this);
2373 EMIT(0xF2); 2346 EMIT(0xF2);
2374 EMIT(0x0F); 2347 EMIT(0x0F);
2375 EMIT(0x5F); 2348 EMIT(0x5F);
2376 emit_sse_operand(dst, src); 2349 emit_sse_operand(dst, src);
2377 } 2350 }
2378 2351
2379 2352
2380 void Assembler::minsd(XMMRegister dst, const Operand& src) { 2353 void Assembler::minsd(XMMRegister dst, const Operand& src) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2541 EnsureSpace ensure_space(this); 2514 EnsureSpace ensure_space(this);
2542 EMIT(0x66); 2515 EMIT(0x66);
2543 EMIT(0x0F); 2516 EMIT(0x0F);
2544 EMIT(0x3A); 2517 EMIT(0x3A);
2545 EMIT(0x17); 2518 EMIT(0x17);
2546 emit_sse_operand(src, dst); 2519 emit_sse_operand(src, dst);
2547 EMIT(imm8); 2520 EMIT(imm8);
2548 } 2521 }
2549 2522
2550 2523
2551 void Assembler::pand(XMMRegister dst, XMMRegister src) {
2552 EnsureSpace ensure_space(this);
2553 EMIT(0x66);
2554 EMIT(0x0F);
2555 EMIT(0xDB);
2556 emit_sse_operand(dst, src);
2557 }
2558
2559
2560 void Assembler::pxor(XMMRegister dst, XMMRegister src) {
2561 EnsureSpace ensure_space(this);
2562 EMIT(0x66);
2563 EMIT(0x0F);
2564 EMIT(0xEF);
2565 emit_sse_operand(dst, src);
2566 }
2567
2568
2569 void Assembler::por(XMMRegister dst, XMMRegister src) {
2570 EnsureSpace ensure_space(this);
2571 EMIT(0x66);
2572 EMIT(0x0F);
2573 EMIT(0xEB);
2574 emit_sse_operand(dst, src);
2575 }
2576
2577
2578 void Assembler::ptest(XMMRegister dst, XMMRegister src) { 2524 void Assembler::ptest(XMMRegister dst, XMMRegister src) {
2579 DCHECK(IsEnabled(SSE4_1)); 2525 DCHECK(IsEnabled(SSE4_1));
2580 EnsureSpace ensure_space(this); 2526 EnsureSpace ensure_space(this);
2581 EMIT(0x66); 2527 EMIT(0x66);
2582 EMIT(0x0F); 2528 EMIT(0x0F);
2583 EMIT(0x38); 2529 EMIT(0x38);
2584 EMIT(0x17); 2530 EMIT(0x17);
2585 emit_sse_operand(dst, src); 2531 emit_sse_operand(dst, src);
2586 } 2532 }
2587 2533
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2881 2827
2882 void Assembler::sse2_instr(XMMRegister dst, const Operand& src, byte prefix, 2828 void Assembler::sse2_instr(XMMRegister dst, const Operand& src, byte prefix,
2883 byte escape, byte opcode) { 2829 byte escape, byte opcode) {
2884 EnsureSpace ensure_space(this); 2830 EnsureSpace ensure_space(this);
2885 EMIT(prefix); 2831 EMIT(prefix);
2886 EMIT(escape); 2832 EMIT(escape);
2887 EMIT(opcode); 2833 EMIT(opcode);
2888 emit_sse_operand(dst, src); 2834 emit_sse_operand(dst, src);
2889 } 2835 }
2890 2836
2837 void Assembler::sse4_instr(XMMRegister dst, const Operand& src, byte prefix,
2838 byte escape1, byte escape2, byte opcode) {
2839 DCHECK(IsEnabled(SSE4_1));
2840 EnsureSpace ensure_space(this);
2841 EMIT(prefix);
2842 EMIT(escape1);
2843 EMIT(escape2);
2844 EMIT(opcode);
2845 emit_sse_operand(dst, src);
2846 }
2847
2891 void Assembler::vinstr(byte op, XMMRegister dst, XMMRegister src1, 2848 void Assembler::vinstr(byte op, XMMRegister dst, XMMRegister src1,
2892 const Operand& src2, SIMDPrefix pp, LeadingOpcode m, 2849 const Operand& src2, SIMDPrefix pp, LeadingOpcode m,
2893 VexW w) { 2850 VexW w) {
2894 DCHECK(IsEnabled(AVX)); 2851 DCHECK(IsEnabled(AVX));
2895 EnsureSpace ensure_space(this); 2852 EnsureSpace ensure_space(this);
2896 emit_vex_prefix(src1, kL128, pp, m, w); 2853 emit_vex_prefix(src1, kL128, pp, m, w);
2897 EMIT(op); 2854 EMIT(op);
2898 emit_sse_operand(dst, src2); 2855 emit_sse_operand(dst, src2);
2899 } 2856 }
2900 2857
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
3097 } 3054 }
3098 RelocInfo rinfo(isolate(), pc_, rmode, data, NULL); 3055 RelocInfo rinfo(isolate(), pc_, rmode, data, NULL);
3099 reloc_info_writer.Write(&rinfo); 3056 reloc_info_writer.Write(&rinfo);
3100 } 3057 }
3101 3058
3102 3059
3103 } // namespace internal 3060 } // namespace internal
3104 } // namespace v8 3061 } // namespace v8
3105 3062
3106 #endif // V8_TARGET_ARCH_IA32 3063 #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