Subversion Repositories HelenOS-historic

Rev

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

Rev 341 Rev 414
Line 34... Line 34...
34
 
34
 
35
.set noat
35
.set noat
36
.set noreorder
36
.set noreorder
37
.set nomacro
37
.set nomacro
38
 
38
 
39
.global context_save
39
.global context_save_arch
40
.global context_restore
40
.global context_restore_arch
41
 
41
 
42
.macro CONTEXT_STORE r
42
.macro CONTEXT_STORE r
43
	sw $s0,OFFSET_S0(\r)
43
	sw $s0,OFFSET_S0(\r)
44
	sw $s1,OFFSET_S1(\r)
44
	sw $s1,OFFSET_S1(\r)
45
	sw $s2,OFFSET_S2(\r)
45
	sw $s2,OFFSET_S2(\r)
Line 70... Line 70...
70
	lw $ra,OFFSET_PC(\r)
70
	lw $ra,OFFSET_PC(\r)
71
	lw $sp,OFFSET_SP(\r)
71
	lw $sp,OFFSET_SP(\r)
72
.endm
72
.endm
73
 
73
 
74
	
74
	
75
context_save:
75
context_save_arch:
76
	CONTEXT_STORE $a0
76
	CONTEXT_STORE $a0
77
 
77
 
78
	# context_save returns 1
78
	# context_save returns 1
79
	j $31
79
	j $31
80
	li $2, 1	
80
	li $2, 1	
81
	
81
	
82
context_restore:
82
context_restore_arch:
83
	CONTEXT_LOAD $a0
83
	CONTEXT_LOAD $a0
84
 
84
 
85
	# context_restore returns 0
85
	# context_restore returns 0
86
	j $31
86
	j $31
87
	xor $2, $2	
87
	xor $2, $2