Subversion Repositories HelenOS-historic

Rev

Rev 1293 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1293 Rev 1615
Line 64... Line 64...
64
.global memcpy_from_uspace_failover_address
64
.global memcpy_from_uspace_failover_address
65
.global memcpy_to_uspace_failover_address
65
.global memcpy_to_uspace_failover_address
66
memcpy:
66
memcpy:
67
memcpy_from_uspace:
67
memcpy_from_uspace:
68
memcpy_to_uspace:
68
memcpy_to_uspace:
-
 
69
	addiu	$v0,$a1,3
-
 
70
	li	$v1,-4			# 0xfffffffffffffffc
-
 
71
	and	$v0,$v0,$v1
-
 
72
	beq	$a1,$v0,3f
-
 
73
	move	$t0,$a0
-
 
74
 
-
 
75
0:
-
 
76
	beq	$a2,$zero,2f
-
 
77
	move	$a3,$zero
-
 
78
 
-
 
79
1:
-
 
80
	addu	$v0,$a1,$a3
-
 
81
	lbu	$a0,0($v0)
-
 
82
	addu	$v1,$t0,$a3
-
 
83
	addiu	$a3,$a3,1
-
 
84
	bne	$a3,$a2,1b
-
 
85
	sb	$a0,0($v1)
-
 
86
 
-
 
87
2:
-
 
88
	jr	$ra
-
 
89
	move	$v0,$a1
-
 
90
 
-
 
91
3:
-
 
92
	addiu	$v0,$a0,3
-
 
93
	and	$v0,$v0,$v1
-
 
94
	bne	$a0,$v0,0b
69
        srl     $t1,$a2,0x2
95
	srl	$t1,$a2,2
-
 
96
 
70
	beqz    $t1,1f
97
	beq	$t1,$zero,5f
71
        move    $t0,$zero
98
	move	$a3,$zero
-
 
99
 
72
        move    $a3,$zero
100
	move	$a3,$zero
-
 
101
	move	$a0,$zero
73
2:	
102
4:
74
        addu    $v0,$a1,$a3
103
	addu	$v0,$a1,$a0
75
        lw      $v1,0($v0)
104
	lw	$v1,0($v0)
76
        addiu   $t0,$t0,1
105
	addiu	$a3,$a3,1
77
        addu    $v0,$a0,$a3
106
	addu	$v0,$t0,$a0
78
        sw      $v1,0($v0)
107
	sw	$v1,0($v0)
79
        bne     $t0,$t1,2b
108
	bne	$a3,$t1,4b
80
        addiu   $a3,$a3,4
109
	addiu	$a0,$a0,4
-
 
110
 
81
1:	
111
5:
82
        andi    $a2,$a2,0x3
112
	andi	$a2,$a2,0x3
83
        beqz    $a2,3f
113
	beq	$a2,$zero,2b
84
        move    $a3,$zero
114
	nop
-
 
115
 
85
        sll     $v0,$t0,0x2
116
	sll	$v0,$a3,2
86
        addu    $t1,$a0,$v0
117
	addu	$t1,$v0,$t0
-
 
118
	move	$a3,$zero
87
        addu    $t0,$v0,$a1
119
	addu	$t0,$v0,$a1
88
4:	
120
6:
89
        addu    $v0,$t0,$a3
121
	addu	$v0,$t0,$a3
90
        lbu     $a0,0($v0)
122
	lbu	$a0,0($v0)
91
        addu    $v1,$t1,$a3
123
	addu	$v1,$t1,$a3
92
        addiu   $a3,$a3,1
124
	addiu	$a3,$a3,1
93
        bne     $a3,$a2,4b
125
	bne	$a3,$a2,6b
94
        sb      $a0,0($v1)
126
	sb	$a0,0($v1)
95
3:	
127
 
96
        jr      $ra
128
	jr	$ra
97
        move    $v0,$a1
129
	move	$v0,$a1
98
 
130
 
99
memcpy_from_uspace_failover_address:
131
memcpy_from_uspace_failover_address:
100
memcpy_to_uspace_failover_address:
132
memcpy_to_uspace_failover_address:
101
	jr	$ra
133
	jr	$ra
102
	move	$v0, $zero
134
	move	$v0, $zero