RFR: 8326306: RISC-V: Re-structure MASM calls and jumps [v8]

Robbin Ehn rehn at openjdk.org
Wed May 8 06:27:53 UTC 2024


On Wed, 8 May 2024 05:12:00 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> The addresses should come from JNI_FastGetField::generate_fast_get_XXX_field0.
>> So slow_case_addr is not really an ExternalAddress.
>> This means call will always do auipc + jalr as you know (intra code cache).
>
> Hmm... So I did a quick try on linux-aarch64 invoking `CodeCache::contains` on slow_case_addr and the result is false. Anything I missed?

The JNI_FastGetField::generate_fast_get_XXX_field0 write the code in a CodeBuffer, this where slow_case_addr points to.

As I test with ReservedCodeCacheSize=2047M if we generated a li() relocation would fail. (there is usually around 120 MB between them)

Added your assert, it passes also.

     ExternalAddress target(slow_case_addr);
+    assert(CodeCache::contains(slow_case_addr), "Must be");
     __ relocate(target.rspec(), [&] {



I guess you are running on apple, the code concerning "static_fast_get_field_wrapper" smells.
Maybe you found a bug here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18942#discussion_r1593449303


More information about the hotspot-dev mailing list