Skip to content

Commit f9f1c8d

Browse files
committed
MIPS: IP22: Reformat inline assembler code to modern standards.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent e4c64e6 commit f9f1c8d

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

arch/mips/mm/sc-ip22.c

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,29 @@ static inline void indy_sc_wipe(unsigned long first, unsigned long last)
3131
unsigned long tmp;
3232

3333
__asm__ __volatile__(
34-
".set\tpush\t\t\t# indy_sc_wipe\n\t"
35-
".set\tnoreorder\n\t"
36-
".set\tmips3\n\t"
37-
".set\tnoat\n\t"
38-
"mfc0\t%2, $12\n\t"
39-
"li\t$1, 0x80\t\t\t# Go 64 bit\n\t"
40-
"mtc0\t$1, $12\n\t"
41-
42-
"dli\t$1, 0x9000000080000000\n\t"
43-
"or\t%0, $1\t\t\t# first line to flush\n\t"
44-
"or\t%1, $1\t\t\t# last line to flush\n\t"
45-
".set\tat\n\t"
46-
47-
"1:\tsw\t$0, 0(%0)\n\t"
48-
"bne\t%0, %1, 1b\n\t"
49-
" daddu\t%0, 32\n\t"
50-
51-
"mtc0\t%2, $12\t\t\t# Back to 32 bit\n\t"
52-
"nop; nop; nop; nop;\n\t"
53-
".set\tpop"
34+
" .set push # indy_sc_wipe \n"
35+
" .set noreorder \n"
36+
" .set mips3 \n"
37+
" .set noat \n"
38+
" mfc0 %2, $12 \n"
39+
" li $1, 0x80 # Go 64 bit \n"
40+
" mtc0 $1, $12 \n"
41+
" \n"
42+
" dli $1, 0x9000000080000000 \n"
43+
" or %0, $1 # first line to flush \n"
44+
" or %1, $1 # last line to flush \n"
45+
" .set at \n"
46+
" \n"
47+
"1: sw $0, 0(%0) \n"
48+
" bne %0, %1, 1b \n"
49+
" daddu %0, 32 \n"
50+
" \n"
51+
" mtc0 %2, $12 # Back to 32 bit \n"
52+
" nop # pipeline hazard \n"
53+
" nop \n"
54+
" nop \n"
55+
" nop \n"
56+
" .set pop \n"
5457
: "=r" (first), "=r" (last), "=&r" (tmp)
5558
: "0" (first), "1" (last));
5659
}

0 commit comments

Comments
 (0)