RFR: 8270086: ARM32-softfp: Do not load CONSTANT_double using the condy helper methods in the interpreter [v2]

Christoph Göttschkes cgo at openjdk.java.net
Tue Jul 27 11:03:53 UTC 2021


> Hi,
> 
> please review this fix for the template interpreter for ARM32-softfp.
> 
> With the introduction of condy, the interpreter started to load double constants using the condy_helper, which is unnecessary. Also, the [resolve_ldc](https://github.com/openjdk/jdk/blob/8973867fb9568a3a527b763c9ce10cebdfb306d0/src/hotspot/share/interpreter/interpreterRuntime.cpp#L148) implementation of the interpreter runtime might not be designed to load constant values. It should only load strings and condy.
> 
> https://github.com/openjdk/jdk/blob/2ee56fd1cf4acd634e19cc77b7c9a6858e1c315a/src/hotspot/cpu/arm/templateTable_arm.cpp#L515-L560
> 
> I refactored the ldc2_w bytecode imlpementation. Now, the ifdef between soft and hard float covers both types, CONSTANT_Long and CONSTANT_Double. I did this, because for the softfp, we can use a conditional cmp, since double and long are both placed on the stack in the same way. The same is also done for CONSTANT_Integer and CONSTANT_Float in the ldc bytecode implementation. Also, I think it is easier to follow the code this way.
> 
> Old ldc2_w implementation (before condy was implemented for ARM32):
> 
> https://github.com/openjdk/jdk/blob/7101b28dc3903be27cb46a00781f4d74f81f1114/src/hotspot/cpu/arm/templateTable_arm.cpp#L497-L537
> 
> Testing: ARMv7-A (hardfp) hotspot tier1, ARMv5TE (softfp) hotspot tier1

Christoph Göttschkes has updated the pull request incrementally with one additional commit since the last revision:

  Use __SOFTFP__ instead of __ABI_HARD__, shrink ifdef blocks.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4767/files
  - new: https://git.openjdk.java.net/jdk/pull/4767/files/b0d8fa6a..13c7824a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4767&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4767&range=00-01

  Stats: 27 lines in 1 file changed: 6 ins; 14 del; 7 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4767.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4767/head:pull/4767

PR: https://git.openjdk.java.net/jdk/pull/4767


More information about the hotspot-compiler-dev mailing list