RFR: 8319429: Resetting MXCSR flags degrades ecore [v2]

Volodymyr Paprotski duke at openjdk.org
Tue Nov 7 03:19:32 UTC 2023


On Tue, 7 Nov 2023 02:56:47 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Volodymyr Paprotski has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   move option to x86-specific section
>
> src/hotspot/cpu/x86/x86.ad line 7443:
> 
>> 7441:   ins_encode %{
>> 7442:     int vlen_enc = vector_length_encoding(this);
>> 7443:     InternalAddress new_mxcsr = $constantaddress((jint)(DoEcoreOpt ? 0x3FBF : 0x3F80));
> 
> You can define a preprocessor macro for conditional selection pattern

Not convinced that it makes it cleaner; while reading, means one extra file lookup to see what the macro does, vs how it immediately is clear now (ctags working half the time..). Macros seem to be paired better here with conditional compilation, don't see them paired with dev options.. 

I can perhaps be convinced, it _is_ repeated 6 times in this PR. Perhaps `globals_x86.hpp` might be an acceptable place, but doesn't appear to have a precedent there.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16504#discussion_r1384323086


More information about the hotspot-compiler-dev mailing list