Skip to content

Commit

Permalink
s390/lib,string: fix strcat() inline asm constraint modifier
Browse files Browse the repository at this point in the history
"dummy" is not only used as output but also as input. Therefore use
the correct "+" constraint modifier.

Fixes: 8cf23c8 ("s390/lib,string: get rid of register asm")
Reported-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
  • Loading branch information
Heiko Carstens authored and Vasily Gorbik committed Jul 5, 2021
1 parent a029a4e commit a0ae5cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/lib/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ char *strcat(char *dest, const char *src)
" jo 0b\n"
"1: mvst %[dummy],%[src]\n"
" jo 1b\n"
: [dummy] "=&a" (dummy), [dest] "+&a" (dest), [src] "+&a" (src)
: [dummy] "+&a" (dummy), [dest] "+&a" (dest), [src] "+&a" (src)
:
: "cc", "memory", "0");
return ret;
Expand Down

0 comments on commit a0ae5cd

Please sign in to comment.