comparison src/cpu/x86/vm/assembler_x86.cpp @ 681:fbde8ec322d0

6761600: Use sse 4.2 in intrinsics Summary: Use SSE 4.2 in intrinsics for String.{compareTo/equals/indexOf} and Arrays.equals. Reviewed-by: kvn, never, jrose
author cfang
date Tue, 31 Mar 2009 14:07:08 -0700
parents d0994e5bebce
children e5b0439ef4ae
comparison
equal deleted inserted replaced
676:d3676b4cb78c 681:fbde8ec322d0
2171 void Assembler::orl(Register dst, Register src) { 2171 void Assembler::orl(Register dst, Register src) {
2172 (void) prefix_and_encode(dst->encoding(), src->encoding()); 2172 (void) prefix_and_encode(dst->encoding(), src->encoding());
2173 emit_arith(0x0B, 0xC0, dst, src); 2173 emit_arith(0x0B, 0xC0, dst, src);
2174 } 2174 }
2175 2175
2176 void Assembler::pcmpestri(XMMRegister dst, Address src, int imm8) {
2177 assert(VM_Version::supports_sse4_2(), "");
2178
2179 InstructionMark im(this);
2180 emit_byte(0x66);
2181 prefix(src, dst);
2182 emit_byte(0x0F);
2183 emit_byte(0x3A);
2184 emit_byte(0x61);
2185 emit_operand(dst, src);
2186 emit_byte(imm8);
2187 }
2188
2189 void Assembler::pcmpestri(XMMRegister dst, XMMRegister src, int imm8) {
2190 assert(VM_Version::supports_sse4_2(), "");
2191
2192 emit_byte(0x66);
2193 int encode = prefixq_and_encode(dst->encoding(), src->encoding());
2194 emit_byte(0x0F);
2195 emit_byte(0x3A);
2196 emit_byte(0x61);
2197 emit_byte(0xC0 | encode);
2198 emit_byte(imm8);
2199 }
2200
2176 // generic 2201 // generic
2177 void Assembler::pop(Register dst) { 2202 void Assembler::pop(Register dst) {
2178 int encode = prefix_and_encode(dst->encoding()); 2203 int encode = prefix_and_encode(dst->encoding());
2179 emit_byte(0x58 | encode); 2204 emit_byte(0x58 | encode);
2180 } 2205 }
2326 emit_byte(0x66); 2351 emit_byte(0x66);
2327 emit_byte(0x0F); 2352 emit_byte(0x0F);
2328 emit_byte(0x73); 2353 emit_byte(0x73);
2329 emit_byte(0xC0 | encode); 2354 emit_byte(0xC0 | encode);
2330 emit_byte(shift); 2355 emit_byte(shift);
2356 }
2357
2358 void Assembler::ptest(XMMRegister dst, Address src) {
2359 assert(VM_Version::supports_sse4_1(), "");
2360
2361 InstructionMark im(this);
2362 emit_byte(0x66);
2363 prefix(src, dst);
2364 emit_byte(0x0F);
2365 emit_byte(0x38);
2366 emit_byte(0x17);
2367 emit_operand(dst, src);
2368 }
2369
2370 void Assembler::ptest(XMMRegister dst, XMMRegister src) {
2371 assert(VM_Version::supports_sse4_1(), "");
2372
2373 emit_byte(0x66);
2374 int encode = prefixq_and_encode(dst->encoding(), src->encoding());
2375 emit_byte(0x0F);
2376 emit_byte(0x38);
2377 emit_byte(0x17);
2378 emit_byte(0xC0 | encode);
2331 } 2379 }
2332 2380
2333 void Assembler::punpcklbw(XMMRegister dst, XMMRegister src) { 2381 void Assembler::punpcklbw(XMMRegister dst, XMMRegister src) {
2334 NOT_LP64(assert(VM_Version::supports_sse2(), "")); 2382 NOT_LP64(assert(VM_Version::supports_sse2(), ""));
2335 emit_byte(0x66); 2383 emit_byte(0x66);