Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/x86_32.ad @ 6138:ccaa67adfe5b
7063674: Wrong results from basic comparisons after calls to Long.bitCount(long)
Reviewed-by: kvn
author | twisti |
---|---|
date | Mon, 11 Jun 2012 16:47:41 -0700 |
parents | 6759698e3140 |
children | 8b0a4867acf0 |
comparison
equal
deleted
inserted
replaced
6137:829ee34e7cbd | 6138:ccaa67adfe5b |
---|---|
5553 ins_cost(125); | 5553 ins_cost(125); |
5554 ins_encode( bswap_long_bytes(dst) ); | 5554 ins_encode( bswap_long_bytes(dst) ); |
5555 ins_pipe( ialu_reg_reg); | 5555 ins_pipe( ialu_reg_reg); |
5556 %} | 5556 %} |
5557 | 5557 |
5558 instruct bytes_reverse_unsigned_short(eRegI dst) %{ | 5558 instruct bytes_reverse_unsigned_short(eRegI dst, eFlagsReg cr) %{ |
5559 match(Set dst (ReverseBytesUS dst)); | 5559 match(Set dst (ReverseBytesUS dst)); |
5560 effect(KILL cr); | |
5560 | 5561 |
5561 format %{ "BSWAP $dst\n\t" | 5562 format %{ "BSWAP $dst\n\t" |
5562 "SHR $dst,16\n\t" %} | 5563 "SHR $dst,16\n\t" %} |
5563 ins_encode %{ | 5564 ins_encode %{ |
5564 __ bswapl($dst$$Register); | 5565 __ bswapl($dst$$Register); |
5565 __ shrl($dst$$Register, 16); | 5566 __ shrl($dst$$Register, 16); |
5566 %} | 5567 %} |
5567 ins_pipe( ialu_reg ); | 5568 ins_pipe( ialu_reg ); |
5568 %} | 5569 %} |
5569 | 5570 |
5570 instruct bytes_reverse_short(eRegI dst) %{ | 5571 instruct bytes_reverse_short(eRegI dst, eFlagsReg cr) %{ |
5571 match(Set dst (ReverseBytesS dst)); | 5572 match(Set dst (ReverseBytesS dst)); |
5573 effect(KILL cr); | |
5572 | 5574 |
5573 format %{ "BSWAP $dst\n\t" | 5575 format %{ "BSWAP $dst\n\t" |
5574 "SAR $dst,16\n\t" %} | 5576 "SAR $dst,16\n\t" %} |
5575 ins_encode %{ | 5577 ins_encode %{ |
5576 __ bswapl($dst$$Register); | 5578 __ bswapl($dst$$Register); |
5727 %} | 5729 %} |
5728 | 5730 |
5729 | 5731 |
5730 //---------- Population Count Instructions ------------------------------------- | 5732 //---------- Population Count Instructions ------------------------------------- |
5731 | 5733 |
5732 instruct popCountI(eRegI dst, eRegI src) %{ | 5734 instruct popCountI(eRegI dst, eRegI src, eFlagsReg cr) %{ |
5733 predicate(UsePopCountInstruction); | 5735 predicate(UsePopCountInstruction); |
5734 match(Set dst (PopCountI src)); | 5736 match(Set dst (PopCountI src)); |
5737 effect(KILL cr); | |
5735 | 5738 |
5736 format %{ "POPCNT $dst, $src" %} | 5739 format %{ "POPCNT $dst, $src" %} |
5737 ins_encode %{ | 5740 ins_encode %{ |
5738 __ popcntl($dst$$Register, $src$$Register); | 5741 __ popcntl($dst$$Register, $src$$Register); |
5739 %} | 5742 %} |
5740 ins_pipe(ialu_reg); | 5743 ins_pipe(ialu_reg); |
5741 %} | 5744 %} |
5742 | 5745 |
5743 instruct popCountI_mem(eRegI dst, memory mem) %{ | 5746 instruct popCountI_mem(eRegI dst, memory mem, eFlagsReg cr) %{ |
5744 predicate(UsePopCountInstruction); | 5747 predicate(UsePopCountInstruction); |
5745 match(Set dst (PopCountI (LoadI mem))); | 5748 match(Set dst (PopCountI (LoadI mem))); |
5749 effect(KILL cr); | |
5746 | 5750 |
5747 format %{ "POPCNT $dst, $mem" %} | 5751 format %{ "POPCNT $dst, $mem" %} |
5748 ins_encode %{ | 5752 ins_encode %{ |
5749 __ popcntl($dst$$Register, $mem$$Address); | 5753 __ popcntl($dst$$Register, $mem$$Address); |
5750 %} | 5754 %} |