2164
2165 void Assembler::orl(Register dst, int32_t imm32) {
2166 prefix(dst);
2167 emit_arith(0x81, 0xC8, dst, imm32);
2168 }
2169
2170
2171 void Assembler::orl(Register dst, Address src) {
2172 InstructionMark im(this);
2173 prefix(src, dst);
2174 emit_byte(0x0B);
2175 emit_operand(dst, src);
2176 }
2177
2178
2179 void Assembler::orl(Register dst, Register src) {
2180 (void) prefix_and_encode(dst->encoding(), src->encoding());
2181 emit_arith(0x0B, 0xC0, dst, src);
2182 }
2183
2184 // generic
2185 void Assembler::pop(Register dst) {
2186 int encode = prefix_and_encode(dst->encoding());
2187 emit_byte(0x58 | encode);
2188 }
2189
2190 void Assembler::popf() {
2191 emit_byte(0x9D);
2192 }
2193
2194 void Assembler::popl(Address dst) {
2195 // NOTE: this will adjust stack by 8byte on 64bits
2196 InstructionMark im(this);
2197 prefix(dst);
2198 emit_byte(0x8F);
2199 emit_operand(rax, dst);
2200 }
2201
2202 void Assembler::prefetch_prefix(Address src) {
2203 prefix(src);
2302 emit_byte(0xF2);
2303 prefix(src, dst); // QQ new
2304 emit_byte(0x0F);
2305 emit_byte(0x70);
2306 emit_operand(dst, src);
2307 emit_byte(mode & 0xFF);
2308 }
2309
2310 void Assembler::psrlq(XMMRegister dst, int shift) {
2311 // HMM Table D-1 says sse2 or mmx
2312 NOT_LP64(assert(VM_Version::supports_sse(), ""));
2313
2314 int encode = prefixq_and_encode(xmm2->encoding(), dst->encoding());
2315 emit_byte(0x66);
2316 emit_byte(0x0F);
2317 emit_byte(0x73);
2318 emit_byte(0xC0 | encode);
2319 emit_byte(shift);
2320 }
2321
2322 void Assembler::punpcklbw(XMMRegister dst, XMMRegister src) {
2323 NOT_LP64(assert(VM_Version::supports_sse2(), ""));
2324 emit_byte(0x66);
2325 int encode = prefix_and_encode(dst->encoding(), src->encoding());
2326 emit_byte(0x0F);
2327 emit_byte(0x60);
2328 emit_byte(0xC0 | encode);
2329 }
2330
2331 void Assembler::push(int32_t imm32) {
2332 // in 64bits we push 64bits onto the stack but only
2333 // take a 32bit immediate
2334 emit_byte(0x68);
2335 emit_long(imm32);
2336 }
2337
2338 void Assembler::push(Register src) {
2339 int encode = prefix_and_encode(src->encoding());
2340
2341 emit_byte(0x50 | encode);
|
2164
2165 void Assembler::orl(Register dst, int32_t imm32) {
2166 prefix(dst);
2167 emit_arith(0x81, 0xC8, dst, imm32);
2168 }
2169
2170
2171 void Assembler::orl(Register dst, Address src) {
2172 InstructionMark im(this);
2173 prefix(src, dst);
2174 emit_byte(0x0B);
2175 emit_operand(dst, src);
2176 }
2177
2178
2179 void Assembler::orl(Register dst, Register src) {
2180 (void) prefix_and_encode(dst->encoding(), src->encoding());
2181 emit_arith(0x0B, 0xC0, dst, src);
2182 }
2183
2184 void Assembler::pcmpestri(XMMRegister dst, Address src, int imm8) {
2185 assert(VM_Version::supports_sse4_2(), "");
2186
2187 InstructionMark im(this);
2188 emit_byte(0x66);
2189 prefix(src, dst);
2190 emit_byte(0x0F);
2191 emit_byte(0x3A);
2192 emit_byte(0x61);
2193 emit_operand(dst, src);
2194 emit_byte(imm8);
2195 }
2196
2197 void Assembler::pcmpestri(XMMRegister dst, XMMRegister src, int imm8) {
2198 assert(VM_Version::supports_sse4_2(), "");
2199
2200 emit_byte(0x66);
2201 int encode = prefixq_and_encode(dst->encoding(), src->encoding());
2202 emit_byte(0x0F);
2203 emit_byte(0x3A);
2204 emit_byte(0x61);
2205 emit_byte(0xC0 | encode);
2206 emit_byte(imm8);
2207 }
2208
2209 // generic
2210 void Assembler::pop(Register dst) {
2211 int encode = prefix_and_encode(dst->encoding());
2212 emit_byte(0x58 | encode);
2213 }
2214
2215 void Assembler::popf() {
2216 emit_byte(0x9D);
2217 }
2218
2219 void Assembler::popl(Address dst) {
2220 // NOTE: this will adjust stack by 8byte on 64bits
2221 InstructionMark im(this);
2222 prefix(dst);
2223 emit_byte(0x8F);
2224 emit_operand(rax, dst);
2225 }
2226
2227 void Assembler::prefetch_prefix(Address src) {
2228 prefix(src);
2327 emit_byte(0xF2);
2328 prefix(src, dst); // QQ new
2329 emit_byte(0x0F);
2330 emit_byte(0x70);
2331 emit_operand(dst, src);
2332 emit_byte(mode & 0xFF);
2333 }
2334
2335 void Assembler::psrlq(XMMRegister dst, int shift) {
2336 // HMM Table D-1 says sse2 or mmx
2337 NOT_LP64(assert(VM_Version::supports_sse(), ""));
2338
2339 int encode = prefixq_and_encode(xmm2->encoding(), dst->encoding());
2340 emit_byte(0x66);
2341 emit_byte(0x0F);
2342 emit_byte(0x73);
2343 emit_byte(0xC0 | encode);
2344 emit_byte(shift);
2345 }
2346
2347 void Assembler::ptest(XMMRegister dst, Address src) {
2348 assert(VM_Version::supports_sse4_1(), "");
2349
2350 InstructionMark im(this);
2351 emit_byte(0x66);
2352 prefix(src, dst);
2353 emit_byte(0x0F);
2354 emit_byte(0x38);
2355 emit_byte(0x17);
2356 emit_operand(dst, src);
2357 }
2358
2359 void Assembler::ptest(XMMRegister dst, XMMRegister src) {
2360 assert(VM_Version::supports_sse4_1(), "");
2361
2362 emit_byte(0x66);
2363 int encode = prefixq_and_encode(dst->encoding(), src->encoding());
2364 emit_byte(0x0F);
2365 emit_byte(0x38);
2366 emit_byte(0x17);
2367 emit_byte(0xC0 | encode);
2368 }
2369
2370 void Assembler::punpcklbw(XMMRegister dst, XMMRegister src) {
2371 NOT_LP64(assert(VM_Version::supports_sse2(), ""));
2372 emit_byte(0x66);
2373 int encode = prefix_and_encode(dst->encoding(), src->encoding());
2374 emit_byte(0x0F);
2375 emit_byte(0x60);
2376 emit_byte(0xC0 | encode);
2377 }
2378
2379 void Assembler::push(int32_t imm32) {
2380 // in 64bits we push 64bits onto the stack but only
2381 // take a 32bit immediate
2382 emit_byte(0x68);
2383 emit_long(imm32);
2384 }
2385
2386 void Assembler::push(Register src) {
2387 int encode = prefix_and_encode(src->encoding());
2388
2389 emit_byte(0x50 | encode);
|