[PATCH] [ARM, Fix] Fix emitLeading/TrailingFence on old ARM processors

Robin Morisset morisset at google.com
Wed Sep 10 17:40:03 PDT 2014


Hi jfb, t.p.northover, luqmana,

I had only tested this code for ARMv7 and ARMv8. This patch adds several
fallback paths if the processor does not support dmb ish:
- dmb sy if a cortex-M with support for dmb
- mcr p15, #0, r0, c7, c10, #5 for ARMv6 (special instruction equivalent to a DMB)
- call to __sync_synchronize otherwise.
These fallback paths were chosen based on the code for fence seq_cst.

Thanks to luqmana for having noticed this bug.

http://reviews.llvm.org/D5304

Files:
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.h
  test/CodeGen/ARM/atomic-load-store.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5304.13568.patch
Type: text/x-patch
Size: 4529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140911/1f71b5cd/attachment.bin>


More information about the llvm-commits mailing list