s390/ebcdic: Fix length decrement in codepage_convert()

The inline assembly uses the ahi instruction to decrement and test
whether more than 256 bytes are left for conversion. But the nr
variable passed is of type unsigned long. Therefore use aghi.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reported-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
Sven Schnelle 2025-01-08 15:27:06 +01:00 committed by Alexander Gordeev
parent 4a0f62a300
commit 061a5e4ac3
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ codepage_convert(const __u8 *codepage, volatile char *addr, unsigned long nr)
"0: tr 0(1,%0),0(%2)\n" "0: tr 0(1,%0),0(%2)\n"
"1: tr 0(256,%0),0(%2)\n" "1: tr 0(256,%0),0(%2)\n"
" la %0,256(%0)\n" " la %0,256(%0)\n"
"2: ahi %1,-256\n" "2: aghi %1,-256\n"
" jnm 1b\n" " jnm 1b\n"
" exrl %1,0b" " exrl %1,0b"
: "+&a" (addr), "+&a" (nr) : "+&a" (addr), "+&a" (nr)