RFR (S): Failure after windows compiler upgrade
nils.eliasson at oracle.com
Mon Apr 27 17:26:41 UTC 2015
The problem could be in any file, but are in practice quite rare, and
the edge cases where it matters even more so. The patch applies the
/arch:IA32 switch to all files in hotspot to be on the safe side.
On 2015-04-27 18:26, Christian Thalinger wrote:
> Looks good. Is this one particular file we are seeing the problem in or is it all over the place?
>> On Apr 27, 2015, at 7:10 AM, Nils Eliasson <nils.eliasson at oracle.com> wrote:
>> Please review this patch.
>> The bug is caused by the instruction sequence generated by the visual studio compiler when casting a long to a float.
>> Visual Studio 2013 has a new behavior where it defaults to generating code targeting SSE2 (and avoids x87). Compiling for a 64-bit target gives the same result as before. Compiling for 32bit VS2013 generates a call to _ltod3 (long2double) and then uses a sse2 instruction to cast it to a float. Casting the long to a double and then to a float gives a different result than casting directly to a float. This is true on all tested configurations. It is unclear why they just didn't use a MOVQ to load the long to an XMM register and then use the same cvtsi2ss as in the other configurations.
>> To fix this we need to add the /arch:IA32 flag to all i586 windows builds. It looks like the IA32 option is ignored on 64-bit builds but we shouldn't count on that. A drawback is that this option also prevents any usage of SSE on the i586 platform.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8077590
>> Webrev: http://cr.openjdk.java.net/~neliasso/8077590/webrev.03/
More information about the hotspot-dev