Subversion Repositories HelenOS-historic

Rev

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

Rev 470 Rev 472
Line 1... Line 1...
1
#
1
#
2
# Copyright (C) 2005 Jakub Vana
2
# Copyright (C) 2005 Jakub Vana
-
 
3
# Copyright (C) 2005 Jakub Jermar
3
# All rights reserved.
4
# All rights reserved.
4
#
5
#
5
# Redistribution and use in source and binary forms, with or without
6
# Redistribution and use in source and binary forms, with or without
6
# modification, are permitted provided that the following conditions
7
# modification, are permitted provided that the following conditions
7
# are met:
8
# are met:
Line 25... Line 26...
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
# (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.
27
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#
28
#
28
 
29
 
29
#include <arch/stack.h>
30
#include <arch/stack.h>
-
 
31
#include <arch/register.h>
30
 
32
 
31
#define STACK_ITEMS		12
33
#define STACK_ITEMS		12
32
#define STACK_FRAME_SIZE	((STACK_ITEMS*STACK_ITEM_SIZE) + STACK_SCRATCH_AREA_SIZE)
34
#define STACK_FRAME_SIZE	((STACK_ITEMS*STACK_ITEM_SIZE) + STACK_SCRATCH_AREA_SIZE)
33
 
35
 
34
#if (STACK_FRAME_SIZE % STACK_ALIGNMENT != 0)
36
#if (STACK_FRAME_SIZE % STACK_ALIGNMENT != 0)
Line 187... Line 189...
187
	mov out0 = r26
189
	mov out0 = r26
188
	
190
	
189
	add out1 = STACK_SCRATCH_AREA_SIZE, r12
191
	add out1 = STACK_SCRATCH_AREA_SIZE, r12
190
 
192
 
191
    /* 6. switch to bank 1 and reenable PSR.ic */
193
    /* 6. switch to bank 1 and reenable PSR.ic */
192
	ssm 0x2000
194
	ssm PSR_IC_MASK
193
	bsw.1 ;;
195
	bsw.1 ;;
194
	srlz.d
196
	srlz.d
195
	
197
	
196
    /* 7. preserve branch and application registers */
198
    /* 7. preserve branch and application registers */
197
    	mov loc3 = ar.unat
199
    	mov loc3 = ar.unat
Line 305... Line 307...
305
	mov b5 = loc14
307
	mov b5 = loc14
306
	mov b6 = loc15
308
	mov b6 = loc15
307
	mov b7 = loc16
309
	mov b7 = loc16
308
	
310
	
309
    /* 15. disable PSR.ic and switch to bank 0 */
311
    /* 15. disable PSR.ic and switch to bank 0 */
310
	rsm 0x2000
312
	rsm PSR_IC_MASK
311
	bsw.0 ;;
313
	bsw.0 ;;
312
	srlz.d
314
	srlz.d
313
 
315
 
314
	mov r24 = loc1
316
	mov r24 = loc1
315
	mov ar.pfs = loc0
317
	mov ar.pfs = loc0