RFR: 8213845: ARM32: Interpreter doesn't call result handler after native calls
Nick.Gasson at arm.com
Tue Nov 20 03:05:43 UTC 2018
Could someone help me review this patch please?
This fixes a failure of the test runtime/BoolReturn/JNIBooleanTest.java
caused by a native method returning a value outside 0..1 as a
jboolean which is then interpreted as Java boolean false. Other
platforms map all non-zero values to 1 when a native method
This is basically the same as bug 8209637 on S390 but the fix for
ARM32 is more complicated as this platform didn't previously use
the "result handler" mechanism.
* We now call the result handler in the interpreter. Restoring
oop results from the stack is now handled here rather than
directly in the native wrapper. Boolean normalisation is
performed if the result type is T_BOOLEAN otherwise the handler
does nothing as before.
* Implemented MacroAssembler::c2bool to match other platforms.
* Call c2bool at the end of SharedRuntime::generate_native_wrapper
to handle boolean results in compiled code.
I've checked that this causes no new Jtreg regressions.
More information about the hotspot-dev