[aarch64-port-dev ] RFR[XXS] 8248672: utilities: Introduce DEPRECATED macro for GCC and MSVC

Andrew Haley aph at redhat.com
Sun Jul 26 09:56:31 UTC 2020


On 25/07/2020 00:42, Kim Barrett wrote:
> Why are we deprecating something rather than just deleting it and
> fixing any users?

C++ overloading. AArch64 CMP (immediate) only has a limited range, so
we only have a byte-wide Assembler::cmp() definition. The deprecation
warning on the wider version makes sure that any maintenance
programmer is immediately warned if it is used. There are other things
we could do: by not providing a definition for the wider cmp() you get
a link error, but that wouldn't be as explicit as a deprecation
warning.

The root problem is that the immediate value to CMP isn't always known
when HotSpot is compiled, but may be calculated at runtime. We have
seen failures in production when an immediate offset overflowed.

-- 
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 hotspot-gc-dev mailing list