[LLVMbugs] [Bug 15429] Clang++ fails compiling on a RPi with sqlite3 library

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 23 12:46:28 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15429

Abdoulaye Walsimou GAYE <awg at embtoolkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #18 from Abdoulaye Walsimou GAYE <awg at embtoolkit.org> ---
This fix does not allow atomic operations for pre v6 devices, as GCC does.

Attched, proposed improvement patch for ARM devices older than v6.
GCC supports up to 4 bytes atomic operations, through libgcc, for devices older
than v6.

Compile and runtime tested on arm926ej-s(armv5te) with various uint{x}_t with
the following code:

#include <stdio.h>
#include <stdint.h>
typedef uint32_t _Atomic_word;

_Atomic_word exchange_and_add(volatile _Atomic_word *__mem, _Atomic_word __val)
{
    return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL);
}
int main()
{
    _Atomic_word test = 40;
    _Atomic_word ret;
    _Atomic_word val = 10;

    ret = exchange_and_add(&test, val);
    printf("RET = %u\n", test);

    return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130723/30adbef4/attachment.html>


More information about the llvm-bugs mailing list