comparison src/cpu/x86/vm/assembler_x86.cpp @ 7643:3ac7d10a6572

Merge with hsx25/hotspot.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 31 Jan 2013 15:42:25 +0100
parents 989155e2d07a b30b3c2a0cf2
children 5fc51c1ecdeb
comparison
equal deleted inserted replaced
7573:17b6a63fe7c2 7643:3ac7d10a6572
2261 void Assembler::packuswb(XMMRegister dst, XMMRegister src) { 2261 void Assembler::packuswb(XMMRegister dst, XMMRegister src) {
2262 NOT_LP64(assert(VM_Version::supports_sse2(), "")); 2262 NOT_LP64(assert(VM_Version::supports_sse2(), ""));
2263 emit_simd_arith(0x67, dst, src, VEX_SIMD_66); 2263 emit_simd_arith(0x67, dst, src, VEX_SIMD_66);
2264 } 2264 }
2265 2265
2266 void Assembler::vpackuswb(XMMRegister dst, XMMRegister nds, XMMRegister src, bool vector256) {
2267 assert(VM_Version::supports_avx() && !vector256 || VM_Version::supports_avx2(), "256 bit integer vectors requires AVX2");
2268 emit_vex_arith(0x67, dst, nds, src, VEX_SIMD_66, vector256);
2269 }
2270
2271 void Assembler::vpermq(XMMRegister dst, XMMRegister src, int imm8, bool vector256) {
2272 int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F_3A, true, vector256);
2273 emit_int8(0x00);
2274 emit_int8(0xC0 | encode);
2275 emit_int8(imm8);
2276 }
2277
2266 void Assembler::pcmpestri(XMMRegister dst, Address src, int imm8) { 2278 void Assembler::pcmpestri(XMMRegister dst, Address src, int imm8) {
2267 assert(VM_Version::supports_sse4_2(), ""); 2279 assert(VM_Version::supports_sse4_2(), "");
2268 InstructionMark im(this); 2280 InstructionMark im(this);
2269 simd_prefix(dst, src, VEX_SIMD_66, VEX_OPCODE_0F_3A); 2281 simd_prefix(dst, src, VEX_SIMD_66, VEX_OPCODE_0F_3A);
2270 emit_int8(0x61); 2282 emit_int8(0x61);
2473 InstructionMark im(this); 2485 InstructionMark im(this);
2474 bool vector256 = true; 2486 bool vector256 = true;
2475 assert(dst != xnoreg, "sanity"); 2487 assert(dst != xnoreg, "sanity");
2476 int dst_enc = dst->encoding(); 2488 int dst_enc = dst->encoding();
2477 // swap src<->dst for encoding 2489 // swap src<->dst for encoding
2478 vex_prefix(src, dst_enc, dst_enc, VEX_SIMD_66, VEX_OPCODE_0F_38, false, vector256); 2490 vex_prefix(src, 0, dst_enc, VEX_SIMD_66, VEX_OPCODE_0F_38, false, vector256);
2479 emit_int8(0x17); 2491 emit_int8(0x17);
2480 emit_operand(dst, src); 2492 emit_operand(dst, src);
2481 } 2493 }
2482 2494
2483 void Assembler::vptest(XMMRegister dst, XMMRegister src) { 2495 void Assembler::vptest(XMMRegister dst, XMMRegister src) {