RFR (S): JDK-8213479: Missing x86_64.ad patterns for 8-bit logical operators with destination in memory

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Nov 7 19:00:08 UTC 2018


Hi Bernard,

I am concern about next statement in Intel's Manual for these byte instructions:

"*In 64-bit mode, r/m8 can not be encoded to access the following byte registers if a REX prefix is 
used: AH, BH, CH, DH."

Also I have question about applications which benefit from it. Which applications has such pattern?
I did not find it in discussion you pointed.

Thanks,
Vladimir

On 11/7/18 10:10 AM, B. Blaser wrote:
> Hi,
> 
> Please review the following small fix for [1] briefly discussed in thread [2]:
> 
> http://cr.openjdk.java.net/~bsrbnd/jdk8213479/webrev.00/
> 
> It adds missing patterns to x86_64.ad for 8-bit logical operators with
> destination in memory.
> For example, the following method would use 4 instructions and 2
> registers instead of currently 10 instructions and 5 registers, see
> [1]:
> 
>      private static byte and = 0b0011, or = 0b0011, xor = 0b0011;
>      private static byte mask = 0b0101;
> 
>      public static void test() {
>          and &= mask;
> 
>          or |= mask;
> 
>          xor ^= mask;
>      }
> 
> Tier1 is OK (hotspot+jdk+langtools).
> 
> Any feedback is welcome,
> Bernard
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8213479
> [2] http://mail.openjdk.java.net/pipermail/jdk-dev/2018-November/002181.html
> 


More information about the hotspot-dev mailing list