Skip to content

Commit

Permalink
Merge pull request #22 from rd-cea/master
Browse files Browse the repository at this point in the history
Fix clang++ compilation error in C++11
  • Loading branch information
raffenet authored Mar 4, 2024
2 parents 7f2034e + f8a2202 commit fdf74c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/primitives/opa_gcc_intel_32_64_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,23 @@ static _opa_inline void OPA_store_release_ptr(OPA_ptr_t *ptr, void *val)

static _opa_inline void OPA_add_int(OPA_int_t *ptr, int val)
{
__asm__ __volatile__ ("lock ; add"OPA_SS" %1,%0"
__asm__ __volatile__ ("lock ; add" OPA_SS " %1,%0"
:"=m" (ptr->v)
:"ir" (val), "m" (ptr->v));
return;
}

static _opa_inline void OPA_incr_int(OPA_int_t *ptr)
{
__asm__ __volatile__ ("lock ; inc"OPA_SS" %0"
__asm__ __volatile__ ("lock ; inc" OPA_SS " %0"
:"=m" (ptr->v)
:"m" (ptr->v));
return;
}

static _opa_inline void OPA_decr_int(OPA_int_t *ptr)
{
__asm__ __volatile__ ("lock ; dec"OPA_SS" %0"
__asm__ __volatile__ ("lock ; dec" OPA_SS " %0"
:"=m" (ptr->v)
:"m" (ptr->v));
return;
Expand All @@ -116,7 +116,7 @@ static _opa_inline void OPA_decr_int(OPA_int_t *ptr)
static _opa_inline int OPA_decr_and_test_int(OPA_int_t *ptr)
{
char result;
__asm__ __volatile__ ("lock ; dec"OPA_SS" %0; setz %1"
__asm__ __volatile__ ("lock ; dec" OPA_SS " %0; setz %1"
:"=m" (ptr->v), "=q" (result)
:"m" (ptr->v));
return result;
Expand Down

0 comments on commit fdf74c8

Please sign in to comment.