--- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp Thu Mar 12 10:37:46 2009 -0700
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp Fri Mar 13 11:35:17 2009 -0700
@@ -2193,6 +2193,25 @@
emit_byte(0x58 | encode);
}
+void Assembler::popcntl(Register dst, Address src) {
+ assert(VM_Version::supports_popcnt(), "must support");
+ InstructionMark im(this);
+ emit_byte(0xF3);
+ prefix(src, dst);
+ emit_byte(0x0F);
+ emit_byte(0xB8);
+ emit_operand(dst, src);
+}
+
+void Assembler::popcntl(Register dst, Register src) {
+ assert(VM_Version::supports_popcnt(), "must support");
+ emit_byte(0xF3);
+ int encode = prefix_and_encode(dst->encoding(), src->encoding());
+ emit_byte(0x0F);
+ emit_byte(0xB8);
+ emit_byte(0xC0 | encode);
+}
+
void Assembler::popf() {
emit_byte(0x9D);
}
@@ -4080,6 +4099,25 @@
addq(rsp, 16 * wordSize);
}
+void Assembler::popcntq(Register dst, Address src) {
+ assert(VM_Version::supports_popcnt(), "must support");
+ InstructionMark im(this);
+ emit_byte(0xF3);
+ prefixq(src, dst);
+ emit_byte(0x0F);
+ emit_byte(0xB8);
+ emit_operand(dst, src);
+}
+
+void Assembler::popcntq(Register dst, Register src) {
+ assert(VM_Version::supports_popcnt(), "must support");
+ emit_byte(0xF3);
+ int encode = prefixq_and_encode(dst->encoding(), src->encoding());
+ emit_byte(0x0F);
+ emit_byte(0xB8);
+ emit_byte(0xC0 | encode);
+}
+
void Assembler::popq(Address dst) {
InstructionMark im(this);
prefixq(dst);