RFR: 8295948: Support for Zicbop/prefetch instructions on RISC-V [v6]
Ludovic Henry
luhenry at openjdk.org
Tue Nov 8 07:34:35 UTC 2022
On Tue, 8 Nov 2022 02:46:56 GMT, Yadong Wang <yadongwang at openjdk.org> wrote:
>> How about we add an assert for now? That `disp` value is driven by `AllocatePrefetchDistance`, `AllocatePrefetchStepSize`, and `AllocatePrefetchLines`/`AllocateInstancePrefetchLines`. Given the default value of these config variables, the maximum `disp` would be `3*CacheLineSize + max(3,1) * CacheLineSize` which is (on most platforms) 384 bytes. If you max-out the number of lines to prefetch, you'd get `3*CacheLineSize + 64 * CacheLineSize` or 4288 bytes which indeed requires more than 12 bit of storage.
>>
>> Either we can safeguard against that in `vm_version_riscv.cpp` (given these values are quite nonsensical in themselves, given the cost/benefit of doing so many prefetches or so far). Either we can complexify the code generation here in that case.
>
> I'm inclined to support the second option.
Fixed.
-------------
PR: https://git.openjdk.org/jdk/pull/10884
More information about the hotspot-dev
mailing list