Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1e369a58
authored
8 years ago
by
Michael Schmid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added %= for unique loop labels
parent
79c7b54b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
base_c/include/embb/base/c/internal/atomic/and_assign.h
+2
-2
base_c/include/embb/base/c/internal/atomic/fetch_and_add.h
+2
-2
base_c/include/embb/base/c/internal/atomic/or_assign.h
+2
-2
base_c/include/embb/base/c/internal/atomic/xor_assign.h
+2
-2
No files found.
base_c/include/embb/base/c/internal/atomic/and_assign.h
View file @
1e369a58
...
...
@@ -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"); \
...
...
This diff is collapsed.
Click to expand it.
base_c/include/embb/base/c/internal/atomic/fetch_and_add.h
View file @
1e369a58
...
...
@@ -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) \
...
...
This diff is collapsed.
Click to expand it.
base_c/include/embb/base/c/internal/atomic/or_assign.h
View file @
1e369a58
...
...
@@ -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"); \
...
...
This diff is collapsed.
Click to expand it.
base_c/include/embb/base/c/internal/atomic/xor_assign.h
View file @
1e369a58
...
...
@@ -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"); \
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment