include/aarch64/host: Fix atomic16_fetch_{and,or}
The tmp[lh] variables were defined as inputs to the asm rather than outputs, which meant that the compiler rightly diagnosed uninitialized inputs. Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6833615bfd
commit
ff633bc5d5
1 changed files with 6 additions and 6 deletions
|
|
@ -67,9 +67,9 @@ static inline Int128 atomic16_fetch_and(Int128 *ptr, Int128 new)
|
||||||
"stlxp %w[tmp], %[tmpl], %[tmph], %[mem]\n\t"
|
"stlxp %w[tmp], %[tmpl], %[tmph], %[mem]\n\t"
|
||||||
"cbnz %w[tmp], 0b"
|
"cbnz %w[tmp], 0b"
|
||||||
: [mem] "+m"(*ptr), [tmp] "=&r"(tmp),
|
: [mem] "+m"(*ptr), [tmp] "=&r"(tmp),
|
||||||
[oldl] "=&r"(oldl), [oldh] "=&r"(oldh)
|
[oldl] "=&r"(oldl), [oldh] "=&r"(oldh),
|
||||||
: [newl] "r"(newl), [newh] "r"(newh),
|
[tmpl] "=&r"(tmpl), [tmph] "=&r"(tmph)
|
||||||
[tmpl] "r"(tmpl), [tmph] "r"(tmph)
|
: [newl] "r"(newl), [newh] "r"(newh)
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
return int128_make128(oldl, oldh);
|
return int128_make128(oldl, oldh);
|
||||||
|
|
@ -87,9 +87,9 @@ static inline Int128 atomic16_fetch_or(Int128 *ptr, Int128 new)
|
||||||
"stlxp %w[tmp], %[tmpl], %[tmph], %[mem]\n\t"
|
"stlxp %w[tmp], %[tmpl], %[tmph], %[mem]\n\t"
|
||||||
"cbnz %w[tmp], 0b"
|
"cbnz %w[tmp], 0b"
|
||||||
: [mem] "+m"(*ptr), [tmp] "=&r"(tmp),
|
: [mem] "+m"(*ptr), [tmp] "=&r"(tmp),
|
||||||
[oldl] "=&r"(oldl), [oldh] "=&r"(oldh)
|
[oldl] "=&r"(oldl), [oldh] "=&r"(oldh),
|
||||||
: [newl] "r"(newl), [newh] "r"(newh),
|
[tmpl] "=&r"(tmpl), [tmph] "=&r"(tmph)
|
||||||
[tmpl] "r"(tmpl), [tmph] "r"(tmph)
|
: [newl] "r"(newl), [newh] "r"(newh)
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
return int128_make128(oldl, oldh);
|
return int128_make128(oldl, oldh);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue