[commit: ghc] master: Add a TODO FIXME w.r.t. D894 (753b156)

git at git.haskell.org git at git.haskell.org
Tue May 19 09:34:16 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/753b156dc6b0c38b106c390952750fb800bf27e7/ghc

>---------------------------------------------------------------

commit 753b156dc6b0c38b106c390952750fb800bf27e7
Author: Austin Seipp <austin at well-typed.com>
Date:   Tue May 19 04:32:49 2015 -0500

    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 at well-typed.com>


>---------------------------------------------------------------

753b156dc6b0c38b106c390952750fb800bf27e7
 includes/stg/SMP.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
index 5460a2b..10ef83e 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");



More information about the ghc-commits mailing list