Skip to content

Commit 94446b4

Browse files
svens-s390Alexander Gordeev
authored andcommitted
s390/ebcdic: Use exrl instead of ex
exrl is present in all machines currently supported, therefore prefer it over ex. This saves one instruction and doesn't need an additional register to hold the address of the target instruction. Signed-off-by: Sven Schnelle <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 90c5515 commit 94446b4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/s390/include/asm/ebcdic.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ codepage_convert(const __u8 *codepage, volatile char *addr, unsigned long nr)
2525
if (nr-- <= 0)
2626
return;
2727
asm volatile(
28-
" bras 1,1f\n"
29-
" tr 0(1,%0),0(%2)\n"
30-
"0: tr 0(256,%0),0(%2)\n"
28+
" j 2f\n"
29+
"0: tr 0(1,%0),0(%2)\n"
30+
"1: tr 0(256,%0),0(%2)\n"
3131
" la %0,256(%0)\n"
32-
"1: ahi %1,-256\n"
33-
" jnm 0b\n"
34-
" ex %1,0(1)"
32+
"2: ahi %1,-256\n"
33+
" jnm 1b\n"
34+
" exrl %1,0b"
3535
: "+&a" (addr), "+&a" (nr)
36-
: "a" (codepage) : "cc", "memory", "1");
36+
: "a" (codepage) : "cc", "memory");
3737
}
3838

3939
#define ASCEBC(addr,nr) codepage_convert(_ascebc, addr, nr)

0 commit comments

Comments
 (0)