[9] RFR(S): 8040121: Load variable through a pointer of an incompatible type in src/hotspot/src/share/vm: opto/output.cpp [...]

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Jul 24 20:24:42 UTC 2014


Christian suggested to use jlong_accessor in output.cpp, so you don't 
need to merge DoubleIntConv.

thanks,
Vladimir

On 7/24/14 9:03 AM, Vladimir Kozlov wrote:
> DoubleIntConv is duplicate of one from 8049043.
>
> Can you combine them?
>
> typedef union {
>    double d;
>    int i[2];
>    struct {
> #ifdef VM_LITTLE_ENDIAN
>      int lo;
>      int hi;
> #else
>      int hi;
>      int lo;
> #endif
>    } split;
> } DoubleIntConv;
>
> Otherwise good.
>
> Thanks,
> Vladimir
>
> On 7/24/14 5:23 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch that fixes the Parfait warnings
>> listed in JDK-8040121.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8040121
>> Webrev: http://cr.openjdk.java.net/~thartmann/8040121/webrev.00/
>>
>> The " Load variable through a pointer of an incompatible type"
>> warnings in following files were fixed:
>>
>> - hotspot.src.share.vm.opto.output.cpp::Compile::FillLocArray
>> -> Pointer cast is replaced by union
>>
>> - hotspot.src.share.vm.runtime.sharedRuntimeTrans.cpp::copysign
>> - hotspot.src.share.vm.runtime.sharedRuntimeTrans.cpp::scalbn
>> -> JDK-8043301 moved these methods to sharedRuntimeMath.cpp, the
>> warnings will be fixed with JDK-8049043
>>
>> - hotspot.src.share.vm.utilities.globalDefinitions_visCPP.hpp::jdouble
>> - hotspot.src.share.vm.utilities.globalDefinitions_visCPP.hpp::jfloat
>> - hotspot.src.share.vm.utilities.globalDefinitions_visCPP.hpp::jint
>> - hotspot.src.share.vm.utilities.globalDefinitions_visCPP.hpp::jlong
>> -> Same methods are in globalDefinitions_gcc.hpp,
>> globalDefinitions_sparcWorks.hpp, globalDefinitions_xlc.hpp. Because
>> they are not compiler specific, I moved the methods into
>> globalDefinitions.hpp. The casts are now implemented using a union.
>>
>> Testing: Parfait, JPRT
>>
>> Thanks,
>> Tobias


More information about the hotspot-compiler-dev mailing list