[aarch64-port-dev ] RFR(s): 8251930: AArch64: Native types mismatch in hotspot
akozlov at azul.com
Tue Aug 18 15:21:53 UTC 2020
Could you please review a fix for C++ types mismatch in cpu/aarch64.
The issue was discovered by trying to compile by aarch64-darwin toolchain, but
it just uncovered a more general problem.
Extra method overloads with for int, long, ... are added to catch all (suitable)
types used for intptr_t, int64_t. Now there are overloads only for int (for
literal values) and int64, latter usually shares a fundamental type with intptr.
The new toolchain provides different types for int64 and intptr. Then both
overloads are not perfect for an intptr argument but possible, so compilation is
failed. Providing additional overload for intptr fixes compilation on new
toolchain but breaks linux, as intptr and int64 are different overloads for
essentially the same type.
Another approach is to leave a single overload for integer type, but literal
integer could still be ambiguously promoted to e.g. pointer or int64. So every
user will have to explicitly cast literal integers to a certain type.
Tested on aarch64-darwin (succesfully compiles cpu/aarch64 code) and
More information about the aarch64-port-dev