From 1e369a58982ae58a8da66833af29e10e743ff0da Mon Sep 17 00:00:00 2001 From: Michael Schmid Date: Thu, 30 Mar 2017 13:03:55 +0200 Subject: [PATCH] added %= for unique loop labels --- base_c/include/embb/base/c/internal/atomic/and_assign.h | 4 ++-- base_c/include/embb/base/c/internal/atomic/fetch_and_add.h | 4 ++-- base_c/include/embb/base/c/internal/atomic/or_assign.h | 4 ++-- base_c/include/embb/base/c/internal/atomic/xor_assign.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base_c/include/embb/base/c/internal/atomic/and_assign.h b/base_c/include/embb/base/c/internal/atomic/and_assign.h index b156b1f..e145052 100644 --- a/base_c/include/embb/base/c/internal/atomic/and_assign.h +++ b/base_c/include/embb/base/c/internal/atomic/and_assign.h @@ -138,11 +138,11 @@ EMBB_DEFINE_AND_ASSIGN(4, "") register uint64_t e_ins = ((uint64_t)width << 32) | pos; \ __asm__ __volatile__ ("dsync\n\t" \ "mov.a %[pointer_to_value], %[add]\n\t" \ - "loop_:\tld.w %H0, [%2]0\n\t" \ + "loop_%=:\tld.w %H0, [%2]0\n\t" \ "insert %L0, %H0, %[value], %A1\n\t" \ "and %L0, %H0\n\t" \ "cmpswap.w [%2]0, %A0\n\t" \ - "jne %H0, %L0, loop_" \ + "jne %H0, %L0, loop_%=" \ : "+d"(e_reg), [e_ins]"+d"(e_ins) \ : [pointer_to_value]"a"(pointer_to_value), [value] "r" (value), [add] "d" (add) \ : "memory"); \ diff --git a/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h b/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h index 56b75e7..71bdf31 100644 --- a/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h +++ b/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h @@ -131,11 +131,11 @@ EMBB_DEFINE_FETCH_AND_ADD(4, "") register uint64_t e_mask = ((uint64_t)width << 32) | pos; \ __asm__ __volatile__ ("dsync\n\t" \ "mov.a %[pointer_to_value], %[add]\n\t" \ - "loop_:\tld.w %H0, [%3]0\n\t" \ + "loop_%=:\tld.w %H0, [%3]0\n\t" \ "insert %L0, %L0, %[value], %A1\n\t" \ "add" EMBB_ATOMIC_TC_SIZE_SUFFIX " %L0, %L0, %H0\n\t" \ "cmpswap.w [%3]0, %A0\n\t" \ - "jne %H0, %L0, loop_\n\t" \ + "jne %H0, %L0, loop_%=\n\t" \ "extr.u %[result], %H0, %A1" \ : "+d"(e_reg), [e_mask]"+d"(e_mask), [result] "=&d" (result) \ : [pointer_to_value]"a"(pointer_to_value), [value] "r" (value), [add] "d" (add) \ diff --git a/base_c/include/embb/base/c/internal/atomic/or_assign.h b/base_c/include/embb/base/c/internal/atomic/or_assign.h index 8b1d1e1..81ac7e8 100644 --- a/base_c/include/embb/base/c/internal/atomic/or_assign.h +++ b/base_c/include/embb/base/c/internal/atomic/or_assign.h @@ -123,11 +123,11 @@ EMBB_DEFINE_OR_ASSIGN(4, "") register uint64_t e_ins = ((uint64_t)width << 32) | pos; \ __asm__ __volatile__ ("dsync\n\t" \ "mov.a %[pointer_to_value], %[add]\n\t" \ - "loop_:\tld.w %H0, [%2]0\n\t" \ + "loop_%=:\tld.w %H0, [%2]0\n\t" \ "insert %L0, %L0, %[value], %A1\n\t" \ "or %L0, %H0\n\t" \ "cmpswap.w [%2]0, %A0\n\t" \ - "jne %H0, %L0, loop_" \ + "jne %H0, %L0, loop_%=" \ : "+d"(e_reg), [e_ins]"+d"(e_ins) \ : [pointer_to_value]"a"(pointer_to_value), [value] "r" (value), [add] "d" (add) \ : "memory"); \ diff --git a/base_c/include/embb/base/c/internal/atomic/xor_assign.h b/base_c/include/embb/base/c/internal/atomic/xor_assign.h index 0859854..557a3f7 100644 --- a/base_c/include/embb/base/c/internal/atomic/xor_assign.h +++ b/base_c/include/embb/base/c/internal/atomic/xor_assign.h @@ -126,11 +126,11 @@ EMBB_DEFINE_XOR_ASSIGN(4, "") register uint64_t e_ins = ((uint64_t)width << 32) | pos; \ __asm__ __volatile__ ("dsync\n\t" \ "mov.a %[pointer_to_value], %[add]\n\t" \ - "loop_:\tld.w %H0, [%2]0\n\t" \ + "loop_%=:\tld.w %H0, [%2]0\n\t" \ "insert %L0, %L0, %[value], %A1\n\t" \ "xor %L0, %H0\n\t" \ "cmpswap.w [%2]0, %A0\n\t" \ - "jne %H0, %L0, loop_" \ + "jne %H0, %L0, loop_%=" \ : "+d"(e_reg), [e_ins]"+d"(e_ins) \ : [pointer_to_value]"a"(pointer_to_value), [value] "r" (value), [add] "d" (add) \ : "memory"); \ -- libgit2 0.26.0