Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Issue 9910029: MIPS: Fix NaN value inconsistency with snapshots (alternate implementation). (Closed)

Created:
8 years, 8 months ago by Paul Lind
Modified:
8 years, 8 months ago
Reviewers:
kisg, Erik Corry, kalmard, danno
CC:
v8-dev
Visibility:
Public.

Description

MIPS: Fix NaN value inconsistency with snapshots (alternate implementation). The NaN values from roots and global object NaN property are incorrect for MIPS HW when snapshot generated on simulator is used. This due to difference in qNaN encoding on MIPS and ia32 architectures. This version uses Erik's suggestion to find and replace all NaN heap objects at serialization time, when performance is not an issue. This must patch the bits without using type 'double', or debug (-O0) builds will quiet the ia32 sNaN (same value as mips qNaN), which then corrupts the bit pattern for mips. BUG= TEST=cctest/test-api/QuietSignalingNaNs, mjsunit/harmony/collections.js

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rebased on r11222, removed unnessary function wrapper. #

Patch Set 3 : Reverted previous approach, now implementing in serializer. #

Patch Set 4 : Fix debug build, by removing use of HeapNumber::set_value() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -0 lines) Patch
M src/serialize.cc View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
danno
Can you just make OS::nan_value() return the right non-signaling qNaN for MIPS when running with ...
8 years, 8 months ago (2012-04-03 09:14:42 UTC) #1
Erik Corry
It would probably be fine just to fix void Serializer::ObjectSerializer::Serialize() { so that it checks ...
8 years, 8 months ago (2012-04-03 11:40:55 UTC) #2
Paul Lind
On 2012/04/03 09:14:42, danno wrote: > Can you just make OS::nan_value() return the right non-signaling ...
8 years, 8 months ago (2012-04-04 05:02:47 UTC) #3
Paul Lind
On 2012/04/03 11:40:55, Erik Corry wrote: > It would probably be fine just to fix ...
8 years, 8 months ago (2012-04-04 05:17:52 UTC) #4
Paul Lind
Updated patch to fix debug builds. When using doubles and HeapNumber::set_value(), code build with -O0 ...
8 years, 8 months ago (2012-04-05 04:12:25 UTC) #5
Erik Corry
I made what i think is a prettier version at https://chromiumcodereview.appspot.com/10068006
8 years, 8 months ago (2012-04-12 09:19:38 UTC) #6
Erik Corry
If the simulator does not stop on signalling NaNs then I think that it should.
8 years, 8 months ago (2012-04-12 09:21:49 UTC) #7
Paul Lind
Erik - Your patch does look prettier, thanks. Works fine for me on sim & ...
8 years, 8 months ago (2012-04-13 04:56:33 UTC) #8
Erik Corry
I presume you mean the MIPS simulator on http://build.chromium.org/p/client.v8/console but the newest failures I can ...
8 years, 8 months ago (2012-04-13 12:16:10 UTC) #9
kalmard
On 2012/04/13 12:16:10, Erik Corry wrote: > I presume you mean the MIPS simulator on ...
8 years, 8 months ago (2012-04-13 12:31:26 UTC) #10
Paul Lind
> On 2012/04/13 12:16:10, Erik Corry wrote: > > I presume you mean the MIPS ...
8 years, 8 months ago (2012-04-13 14:50:05 UTC) #11
Paul Lind
I had a bug in my tester config for Linux. It does fail for me ...
8 years, 8 months ago (2012-04-14 03:38:10 UTC) #12
Paul Lind
8 years, 8 months ago (2012-04-16 04:30:23 UTC) #13
Paul Lind
8 years, 8 months ago (2012-04-16 04:42:30 UTC) #14
After looking more, I think that trying to patch ia32 sNaN's into the heap
exposes fragile behavior, including compiler version dependencies. Seems much
cleaner to do this on the end target after de-ser.

New CL: https://chromiumcodereview.appspot.com/10093007/, properly tested this
time.

If you feel strongly otherwise I have another (un-published) CL here:
https://chromiumcodereview.appspot.com/10093008, but I am pretty uncomfortable
with this one, as it's a workaround for a bad fix, IMO. But it does work.

Powered by Google App Engine
This is Rietveld 408576698