summaryrefslogtreecommitdiff
path: root/includes/stg
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2015-05-19 04:32:49 -0500
committerAustin Seipp <austin@well-typed.com>2015-05-19 04:32:52 -0500
commit753b156dc6b0c38b106c390952750fb800bf27e7 (patch)
treee0529e3e7215e908d927166d4676d540518d202f /includes/stg
parent470a94947b076cb74a6adcbcf9b39057a67e1fba (diff)
downloadhaskell-753b156dc6b0c38b106c390952750fb800bf27e7.tar.gz
Add a TODO FIXME w.r.t. D894
As Reid mentioned in a comment on D894, the case fixed by this revision likely isn't really correct, because old ARM binaries could run on newer machines, meaning we need to detect at runtime whether we need a proper barrier. But in the mean time, this actually stops the build from failing - which is better off. So we'll just remember this when we fix it in the future. Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'includes/stg')
-rw-r--r--includes/stg/SMP.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
index 5460a2bd04..10ef83ee13 100644
--- a/includes/stg/SMP.h
+++ b/includes/stg/SMP.h
@@ -374,6 +374,11 @@ store_load_barrier(void) {
#elif sparc_HOST_ARCH
__asm__ __volatile__ ("membar #StoreLoad" : : : "memory");
#elif arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv7)
+ // TODO FIXME: This case probably isn't totally correct - just because we
+ // use a pre-ARMv7 toolchain (e.g. to target an old Android device), doesn't
+ // mean the binary won't run on a newer ARMv7 system - in which case it
+ // needs a proper barrier. So we should rethink this
+ // - Reid
__asm__ __volatile__ ("" : : : "memory");
#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
__asm__ __volatile__ ("dmb" : : : "memory");