Ticket #10244: 0001-includes-stg-SMP.h-implement-load_-store_load_barrie.patch

File 0001-includes-stg-SMP.h-implement-load_-store_load_barrie.patch, 1.3 KB (added by slyfox, 5 years ago)

0001-includes-stg-SMP.h-implement-load_-store_load_barrie.patch

  • includes/stg/SMP.h

    From 5fcb235d132065bc08752612f91a6d7c01d4fd6d Mon Sep 17 00:00:00 2001
    From: Sergei Trofimovich <siarheit@google.com>
    Date: Wed, 13 May 2015 23:13:57 +0100
    Subject: [PATCH] includes/stg/SMP.h: implement load_/store_load_barrier on
     armv6 and older
    
    Fixes trac: #10244
    
    Signed-off-by: Sergei Trofimovich <siarheit@google.com>
    ---
     includes/stg/SMP.h | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
    index 5ded05d..5460a2b 100644
    a b store_load_barrier(void) { 
    373373    __asm__ __volatile__ ("sync" : : : "memory");
    374374#elif sparc_HOST_ARCH
    375375    __asm__ __volatile__ ("membar #StoreLoad" : : : "memory");
     376#elif arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv7)
     377    __asm__ __volatile__ ("" : : : "memory");
    376378#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
    377379    __asm__ __volatile__ ("dmb" : : : "memory");
    378380#elif aarch64_HOST_ARCH
    load_load_barrier(void) { 
    395397#elif sparc_HOST_ARCH
    396398    /* Sparc in TSO mode does not require load/load barriers. */
    397399    __asm__ __volatile__ ("" : : : "memory");
     400#elif arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv7)
     401    __asm__ __volatile__ ("" : : : "memory");
    398402#elif arm_HOST_ARCH && !defined(arm_HOST_ARCH_PRE_ARMv7)
    399403    __asm__ __volatile__ ("dmb" : : : "memory");
    400404#elif aarch64_HOST_ARCH