[aarch64-port-dev ] Fwd: RFR(xs): 8233019: java.lang.Class.isPrimitive() (C1) returns wrong result if Klass* is aligned to 32bit
Andrew Haley
aph at redhat.com
Mon Nov 4 17:22:03 UTC 2019
On 11/4/19 3:21 PM, Thomas Stüfe wrote:
> could some aarch64 people please take a quick look at this small patch?
>
> The aarch64 part is really tiny, but I have no possibility to test this.
>
> Last webrev:
> http://cr.openjdk.java.net/~stuefe/webrevs/8233019--c1-intrinsic-for-java.lang.class.isprimitive()-does-32bit-compare/webrev.01/webrev/
> Issue: https://bugs.openjdk.java.net/browse/JDK-8233019
Seems fine.
Before:
;; block B0 [0, 4]
0x0000ffffa1d93f54: ldr x0, [x1, #80] ; implicit exception: dispatches to 0x0000ffffa1d93f78
0x0000ffffa1d93f58: cmp w0, #0x0
0x0000ffffa1d93f5c: cset x0, eq // eq = none ;*invokevirtual isPrimitive {reexecute=0 rethrow=0 return_oop=0}
; - IsPrimitiveTest::isPrimitive at 1 (line 4)
After:
;; block B0 [0, 4]
0x0000ffff71dc75d4: ldr x0, [x1, #80] ; implicit exception: dispatches to 0x0000ffff71dc75f8
0x0000ffff71dc75d8: cmp x0, #0x0
0x0000ffff71dc75dc: cset x0, eq // eq = none ;*invokevirtual isPrimitive {reexecute=0 rethrow=0 return_oop=0}
; - IsPrimitiveTest::isPrimitive at 1 (line 4)
i.e. the first test is "cmp w0, #0x0", the second is "cmp x0, #0x0".
The first is a 32-bit comparison, the second 64-bit.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list