Need to use `jlong_to_ptr` instead of raw cast.

I've also fixed another latent issue in `CLayouts` where we were initializing 
`C_LONG_LONG` with the `long` layout. This was resulting in a class cast 
exception when running the XorTest benchmark. The size of `long` on Linux x86 
32-bits is 4 bytes, so the returned layout has type `ValueLayout.OfInt` which 
we then try to cast to `ValueLayout.OfLong`, resulting in a CCE. This would 
also be an issue on Windows.

Testing: running XorTest benchmark on linux-x86 and windows-x64.

-------------

Commit messages:
 - Fix x86 running of XorTest

Changes: https://git.openjdk.org/jdk/pull/16913/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16913&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8321130
  Stats: 5 lines in 2 files changed: 2 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/16913.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16913/head:pull/16913

PR: https://git.openjdk.org/jdk/pull/16913

Reply via email to