[PATCH] [AArch64] Add workaround for Cortex-A53 erratum (835769)

Bradley Smith bradley.smith at arm.com
Fri Oct 10 02:06:49 PDT 2014


Some early revisions of the Cortex-A53 have an erratum (835769) whereby it is
possible for a 64-bit multiply-accumulate instruction in AArch64 state to
generate an incorrect result.  The details are quite complex and hard to
determine statically, since branches in the code may exist in some
circumstances, but all cases end with a memory (load, store, or prefetch)
instruction followed immediately by the multiply-accumulate operation.

The safest work-around for this issue is to make the compiler avoid emitting
multiply-accumulate instructions immediately after memory instructions and the
simplest way to do this is to insert a NOP.

This patch implements clang options to enable this workaround in the backend.

The work-around code generation is not enabled by default.

http://reviews.llvm.org/D5722

Files:
  include/clang/Driver/Options.td
  lib/Driver/Tools.cpp
  test/Driver/aarch64-fix-cortex-a53-835769-cg.c
  test/Driver/aarch64-fix-cortex-a53-835769.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5722.14707.patch
Type: text/x-patch
Size: 3485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141010/fcf64fbc/attachment.bin>


More information about the cfe-commits mailing list