Subversion Repositories HelenOS-historic

Rev

Rev 1685 | Rev 1773 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1685 Rev 1771
Line 24... Line 24...
24
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#
27
#
28
 
28
 
29
#include "regname.h"
-
 
30
 
-
 
31
.set noat
-
 
32
.set noreorder
-
 
33
.set nomacro
-
 
34
 
-
 
35
.text
29
.text
36
 
30
 
37
.global halt
31
.global halt
38
.global memcpy
32
.global memcpy
39
.global jump_to_kernel
33
.global jump_to_kernel
Line 41... Line 35...
41
halt:
35
halt:
42
	b halt
36
	b halt
43
	nop
37
	nop
44
	
38
	
45
memcpy:
39
memcpy:
46
	addiu	$v0,$a1,3
-
 
47
	li	$v1,-4			# 0xfffffffffffffffc
-
 
48
	and	$v0,$v0,$v1
-
 
49
	beq	$a1,$v0,3f
-
 
50
	move	$t0,$a0
-
 
51
 
-
 
52
0:
-
 
53
	beq	$a2,$zero,2f
-
 
54
	move	$a3,$zero
-
 
55
 
-
 
56
1:
-
 
57
	addu	$v0,$a1,$a3
-
 
58
	lbu	$a0,0($v0)
-
 
59
	addu	$v1,$t0,$a3
-
 
60
	addiu	$a3,$a3,1
-
 
61
	bne	$a3,$a2,1b
-
 
62
	sb	$a0,0($v1)
-
 
63
 
-
 
64
2:
-
 
65
	jr	$ra
40
	b memcpy
66
	move	$v0,$a1
-
 
67
 
-
 
68
3:
-
 
69
	addiu	$v0,$a0,3
-
 
70
	and	$v0,$v0,$v1
-
 
71
	bne	$a0,$v0,0b
-
 
72
	srl	$t1,$a2,2
-
 
73
 
-
 
74
	beq	$t1,$zero,5f
-
 
75
	move	$a3,$zero
-
 
76
 
-
 
77
	move	$a3,$zero
-
 
78
	move	$a0,$zero
-
 
79
4:
-
 
80
	addu	$v0,$a1,$a0
-
 
81
	lw	$v1,0($v0)
-
 
82
	addiu	$a3,$a3,1
-
 
83
	addu	$v0,$t0,$a0
-
 
84
	sw	$v1,0($v0)
-
 
85
	bne	$a3,$t1,4b
-
 
86
	addiu	$a0,$a0,4
-
 
87
 
-
 
88
5:
-
 
89
	andi	$a2,$a2,0x3
-
 
90
	beq	$a2,$zero,2b
-
 
91
	nop
41
	nop
92
 
42
 
93
	sll	$v0,$a3,2
-
 
94
	addu	$t1,$v0,$t0
-
 
95
	move	$a3,$zero
-
 
96
	addu	$t0,$v0,$a1
-
 
97
6:
-
 
98
	addu	$v0,$t0,$a3
-
 
99
	lbu	$a0,0($v0)
-
 
100
	addu	$v1,$t1,$a3
-
 
101
	addiu	$a3,$a3,1
-
 
102
	bne	$a3,$a2,6b
-
 
103
	sb	$a0,0($v1)
-
 
104
 
-
 
105
	jr	$ra
-
 
106
	move	$v0,$a1
-
 
107
 
-
 
108
jump_to_kernel:
43
jump_to_kernel:
109
#	.word 0x39
44
	b jump_to_kernel
110
	j $a0
-
 
111
	nop
45
	nop