src/cpu/x86/vm/x86_64.ad
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
7063674 Cdiff src/cpu/x86/vm/x86_64.ad
src/cpu/x86/vm/x86_64.ad
Print this page
*** 6415,6444 ****
instruct bytes_reverse_long(rRegL dst) %{
match(Set dst (ReverseBytesL dst));
format %{ "bswapq $dst" %}
-
opcode(0x0F, 0xC8); /* Opcode 0F /C8 */
ins_encode( REX_reg_wide(dst), OpcP, opc2_reg(dst) );
ins_pipe( ialu_reg);
%}
! instruct bytes_reverse_unsigned_short(rRegI dst) %{
match(Set dst (ReverseBytesUS dst));
format %{ "bswapl $dst\n\t"
"shrl $dst,16\n\t" %}
ins_encode %{
__ bswapl($dst$$Register);
__ shrl($dst$$Register, 16);
%}
ins_pipe( ialu_reg );
%}
! instruct bytes_reverse_short(rRegI dst) %{
match(Set dst (ReverseBytesS dst));
format %{ "bswapl $dst\n\t"
"sar $dst,16\n\t" %}
ins_encode %{
__ bswapl($dst$$Register);
--- 6415,6445 ----
instruct bytes_reverse_long(rRegL dst) %{
match(Set dst (ReverseBytesL dst));
format %{ "bswapq $dst" %}
opcode(0x0F, 0xC8); /* Opcode 0F /C8 */
ins_encode( REX_reg_wide(dst), OpcP, opc2_reg(dst) );
ins_pipe( ialu_reg);
%}
! instruct bytes_reverse_unsigned_short(rRegI dst, rFlagsReg cr) %{
match(Set dst (ReverseBytesUS dst));
+ effect(KILL cr);
format %{ "bswapl $dst\n\t"
"shrl $dst,16\n\t" %}
ins_encode %{
__ bswapl($dst$$Register);
__ shrl($dst$$Register, 16);
%}
ins_pipe( ialu_reg );
%}
! instruct bytes_reverse_short(rRegI dst, rFlagsReg cr) %{
match(Set dst (ReverseBytesS dst));
+ effect(KILL cr);
format %{ "bswapl $dst\n\t"
"sar $dst,16\n\t" %}
ins_encode %{
__ bswapl($dst$$Register);
*** 6562,6609 ****
%}
//---------- Population Count Instructions -------------------------------------
! instruct popCountI(rRegI dst, rRegI src) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountI src));
format %{ "popcnt $dst, $src" %}
ins_encode %{
__ popcntl($dst$$Register, $src$$Register);
%}
ins_pipe(ialu_reg);
%}
! instruct popCountI_mem(rRegI dst, memory mem) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountI (LoadI mem)));
format %{ "popcnt $dst, $mem" %}
ins_encode %{
__ popcntl($dst$$Register, $mem$$Address);
%}
ins_pipe(ialu_reg);
%}
// Note: Long.bitCount(long) returns an int.
! instruct popCountL(rRegI dst, rRegL src) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountL src));
format %{ "popcnt $dst, $src" %}
ins_encode %{
__ popcntq($dst$$Register, $src$$Register);
%}
ins_pipe(ialu_reg);
%}
// Note: Long.bitCount(long) returns an int.
! instruct popCountL_mem(rRegI dst, memory mem) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountL (LoadL mem)));
format %{ "popcnt $dst, $mem" %}
ins_encode %{
__ popcntq($dst$$Register, $mem$$Address);
%}
--- 6563,6614 ----
%}
//---------- Population Count Instructions -------------------------------------
! instruct popCountI(rRegI dst, rRegI src, rFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountI src));
+ effect(KILL cr);
format %{ "popcnt $dst, $src" %}
ins_encode %{
__ popcntl($dst$$Register, $src$$Register);
%}
ins_pipe(ialu_reg);
%}
! instruct popCountI_mem(rRegI dst, memory mem, rFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountI (LoadI mem)));
+ effect(KILL cr);
format %{ "popcnt $dst, $mem" %}
ins_encode %{
__ popcntl($dst$$Register, $mem$$Address);
%}
ins_pipe(ialu_reg);
%}
// Note: Long.bitCount(long) returns an int.
! instruct popCountL(rRegI dst, rRegL src, rFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountL src));
+ effect(KILL cr);
format %{ "popcnt $dst, $src" %}
ins_encode %{
__ popcntq($dst$$Register, $src$$Register);
%}
ins_pipe(ialu_reg);
%}
// Note: Long.bitCount(long) returns an int.
! instruct popCountL_mem(rRegI dst, memory mem, rFlagsReg cr) %{
predicate(UsePopCountInstruction);
match(Set dst (PopCountL (LoadL mem)));
+ effect(KILL cr);
format %{ "popcnt $dst, $mem" %}
ins_encode %{
__ popcntq($dst$$Register, $mem$$Address);
%}
src/cpu/x86/vm/x86_64.ad
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File