Subversion Repositories HelenOS-historic

Rev

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

Rev 501 Rev 525
Line 25... Line 25...
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 <arch/context_offset.h>
29
#include <arch/context_offset.h>
-
 
30
#include <arch/stack.h>
30
	
31
	
31
.text   
32
.text   
32
 
33
 
33
.global context_save_arch
34
.global context_save_arch
34
.global context_restore_arch
35
.global context_restore_arch
Line 70... Line 71...
70
	ldx [\r + OFFSET_SP], %sp
71
	ldx [\r + OFFSET_SP], %sp
71
.endm
72
.endm
72
 
73
 
73
	
74
	
74
context_save_arch:
75
context_save_arch:
75
	save %sp, -128, %sp
76
	save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
76
	CONTEXT_STORE %i0
77
	CONTEXT_STORE %i0
77
 
78
 
78
	# context_save returns 1
79
	# context_save returns 1
79
	mov 1, %i0	
80
	mov 1, %i0	
80
	ret
81
	ret
81
	restore %sp, 128, %sp
82
	restore %sp, 128, %sp
82
	
83
	
83
context_restore_arch:
84
context_restore_arch:
84
	save %sp, -128, %sp
85
	save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
85
	CONTEXT_LOAD %i0
86
	CONTEXT_LOAD %i0
86
 
87
 
87
	# context_restore returns 0
88
	# context_restore returns 0
88
	xor %i0, %i0, %i0			
89
	xor %i0, %i0, %i0			
89
	ret
90
	ret
90
	restore %sp, 128, %sp	
91
	restore %sp, STACK_WINDOW_SAVE_AREA_SIZE, %sp