Ticket #5327: llsc-mips.patch

File llsc-mips.patch, 1.2 KB (added by Oliver Kowalke <oliver.kowalke@…>, 7 years ago)

patching inline assembler for MIPS

  • boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp

    /boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp b/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
    a b  
    3737    __asm__ __volatile__
    3838    (
    3939        "0:\n\t"
     40        ".set push\n\t"
     41        ".set mips2\n\t"
    4042        "ll %0, %1\n\t"
    4143        "addiu %0, 1\n\t"
    4244        "sc %0, %1\n\t"
     45        ".set pop\n\t"
    4346        "beqz %0, 0b":
    4447        "=&r"( tmp ), "=m"( *pw ):
    4548        "m"( *pw )
     
    5558    __asm__ __volatile__
    5659    (
    5760        "0:\n\t"
     61        ".set push\n\t"
     62        ".set mips2\n\t"
    5863        "ll %1, %2\n\t"
    5964        "addiu %0, %1, -1\n\t"
    6065        "sc %0, %2\n\t"
     66        ".set pop\n\t"
    6167        "beqz %0, 0b\n\t"
    6268        "addiu %0, %1, -1":
    6369        "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
     
    7884    __asm__ __volatile__
    7985    (
    8086        "0:\n\t"
     87        ".set push\n\t"
     88        ".set mips2\n\t"
    8189        "ll %0, %2\n\t"
    8290        "beqz %0, 1f\n\t"
    8391        "addiu %1, %0, 1\n\t"
    8492        "sc %1, %2\n\t"
     93        ".set pop\n\t"
    8594        "beqz %1, 0b\n\t"
    8695        "addiu %0, %0, 1\n\t"
    8796        "1:":