adding i18n strings
[open-ps2-loader.git] / modules / network / SMSMAP / smap_opt.s
blob3a5e076715df88ca4c772f61d2db64639acbbf46
1 .set noreorder
2 .set nomacro
3 .set noat
5 .globl SMAP_CopyFromFIFO
6 .globl SMAP_CopyToFIFO
8 .text
9 SMAP_CopyFromFIFO:
10 lhu $v1, 8($a1)
11 lhu $a2, 38($a0)
12 li $v0, -4
13 lui $a3, 0xB000
14 addiu $v1, $v1, 3
15 and $v1, $v1, $v0
16 srl $at, $v1, 5
17 lw $a0, 4($a1)
18 sh $a2, 4148($a3)
19 beqz $at, 3f
20 andi $v1, $v1, 0x1F
22 lw $t0, 4608($a3)
23 lw $t1, 4608($a3)
24 lw $t2, 4608($a3)
25 lw $t3, 4608($a3)
26 lw $t4, 4608($a3)
27 lw $t5, 4608($a3)
28 lw $t6, 4608($a3)
29 lw $t7, 4608($a3)
30 addiu $at, $at, -1
31 sw $t0, 0($a0)
32 sw $t1, 4($a0)
33 sw $t2, 8($a0)
34 sw $t3, 12($a0)
35 sw $t4, 16($a0)
36 sw $t5, 20($a0)
37 sw $t6, 24($a0)
38 sw $t7, 28($a0)
39 bgtz $at, 4b
40 addiu $a0, $a0, 32
42 beqz $v1, 1f
43 nop
45 lw $v0, 4608($a3)
46 addiu $v1, $v1, -4
47 sw $v0, 0($a0)
48 bnez $v1, 2b
49 addiu $a0, $a0, 4
51 jr $ra
52 nop
54 SMAP_CopyToFIFO:
55 srl $at, $a2, 4
56 lhu $v0, 30($a0)
57 lui $v1, 0xB000
58 sh $v0, 4100($v1)
59 beqz $at, 3f
60 andi $a2, $a2, 0xF
62 lwr $t0, 0($a1)
63 lwl $t0, 3($a1)
64 lwr $t1, 4($a1)
65 lwl $t1, 7($a1)
66 lwr $t2, 8($a1)
67 lwl $t2, 11($a1)
68 lwr $t3, 12($a1)
69 lwl $t3, 15($a1)
70 addiu $at, $at, -1
71 sw $t0, 4352($v1)
72 sw $t1, 4352($v1)
73 sw $t2, 4352($v1)
74 addiu $a1, $a1, 16
75 bgtz $at, 4b
76 sw $t3, 4352($v1)
78 beqz $a2, 1f
79 nop
81 lwr $v0, 0($a1)
82 lwl $v0, 3($a1)
83 addiu $a2, $a2, -4
84 sw $v0, 4352($v1)
85 bnez $a2, 2b
86 addiu $a1, $a1, 4
88 jr $ra
89 nop