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

Issue 692703003: Work around GCC bug that results in incorrect simd128_value_t copying. (Closed)

Created:
6 years, 1 month ago by Vyacheslav Egorov (Google)
Modified:
6 years, 1 month ago
Reviewers:
Cutch
CC:
reviews_dartlang.org, vm-dev_dartlang.org, regis
Visibility:
Public.

Description

Work around GCC bug that results in incorrect simd128_value_t copying. Under certain conditions GCC on x86 decides to copy simd128_value_t through FPU stack. For example Int32x4::value getter would contain the following code: 212d5: d9 46 07 fld DWORD PTR [esi+0x7] 212d8: d9 46 0b fld DWORD PTR [esi+0xb] 212db: 8b 46 03 mov eax,DWORD PTR [esi+0x3] 212de: d9 46 0f fld DWORD PTR [esi+0xf] 212e1: d9 ca fxch st(2) 212e3: d9 5b 04 fstp DWORD PTR [ebx+0x4] 212e6: d9 5b 08 fstp DWORD PTR [ebx+0x8] 212e9: 89 03 mov DWORD PTR [ebx],eax 212eb: d9 5b 0c fstp DWORD PTR [ebx+0xc] This code is incorrect. For example an attempt to copy an int32_t value that looks like sNaN will result in it turning into a qNaN which changes the value being copied. GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416 This was causing flakiness when people were running WebSocket related tests locally on Dart VM binaries built with GCC as our WebSocket implementation uses Int32x4 values to speed up payload masking/unmasking. Bots were not affected because they are building with clang. BUG=http://dartbug.com/21220 R=johnmccutchan@google.com Committed: https://code.google.com/p/dart/source/detail?r=41581

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M runtime/platform/globals.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (1 generated)
Vyacheslav Egorov (Google)
PTAL
6 years, 1 month ago (2014-11-06 20:04:16 UTC) #2
Cutch
lgtm
6 years, 1 month ago (2014-11-06 20:06:14 UTC) #3
Vyacheslav Egorov (Google)
6 years, 1 month ago (2014-11-06 20:17:26 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 41581 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698