mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 17:14:41 +02:00
8199421: Add support for vector popcount
Reviewed-by: kvn
This commit is contained in:
parent
147488cbce
commit
343cf9910d
13 changed files with 209 additions and 6 deletions
|
@ -8709,6 +8709,15 @@ void Assembler::popcntq(Register dst, Register src) {
|
|||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
}
|
||||
|
||||
void Assembler::vpopcntd(XMMRegister dst, XMMRegister src, int vector_len) {
|
||||
assert(VM_Version::supports_vpopcntdq(), "must support vpopcntdq feature");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
|
||||
attributes.set_is_evex_instruction();
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
|
||||
emit_int8(0x55);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
}
|
||||
|
||||
void Assembler::popq(Address dst) {
|
||||
InstructionMark im(this);
|
||||
prefixq(dst);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue