|Summary:||[JSC] Erratum (835769) in Cortex-A53|
|Product:||WebKit||Reporter:||Akos Kiss <akiss>|
|Severity:||Normal||CC:||commit-queue, dbates, fpizlo, gyuyoung.kim, loki, msaboff, rakuco, ryuan.choi, sergio|
|Version:||528+ (Nightly build)|
Description Akos Kiss 2014-11-03 10:22:22 PST
There is an erratum (835769) in some Cortex-A53, which can only be worked around at code generation: It is possible for an A64 64-bit multiply-accumulate instruction to generate an incorrect result when immediately preceded by a memory instruction. In WebKit, that means 4 affected stages, potentially: 1. compilation with gcc or clang 2. processing LLInt asm sources with the offline assembler 3. MacroAssembler 4. LLVM in FTL 1. Fixes for both gcc and clang have already been submitted: https://gcc.gnu.org/ml/gcc-cvs/2014-10/msg00331.html https://gcc.gnu.org/ml/gcc-cvs/2014-10/msg00332.html https://gcc.gnu.org/ml/gcc-cvs/2014-10/msg00333.html https://gcc.gnu.org/ml/gcc-cvs/2014-10/msg00335.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141006/239368.html http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141006/116322.html So, if building WebKit for Cortex-A53, the build system should detect whether the compiler tool chain has support for the workaround and apply it if available. 2 & 3. Offlineasm & MacroAssembler should be amended with the workaround. 4. LLVM trunk already has the workaround, so as soon as ARM64 (for Linux) has FTL working, WebKit can rely on LLVM generating correct code.
Comment 1 Filip Pizlo 2014-11-03 10:26:54 PST
Please make sure that whatever this fix is, it is possible to disable it. It should be disabled by default on Darwin.
Comment 2 Akos Kiss 2014-11-03 10:31:58 PST
Comment 3 Filip Pizlo 2014-11-03 10:46:30 PST
Comment 4 Akos Kiss 2014-11-03 12:10:51 PST
Created attachment 240866 [details] Updated patch Thanks for the suggestion. Applied.
Comment 5 WebKit Commit Bot 2014-11-03 23:36:15 PST
Comment on attachment 240866 [details] Updated patch Clearing flags on attachment: 240866 Committed r175514: <http://trac.webkit.org/changeset/175514>
Comment 6 WebKit Commit Bot 2014-11-03 23:36:19 PST
All reviewed patches have been landed. Closing bug.