Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 525 → Rev 524

/kernel/trunk/arch/sparc64/src/context.S
27,7 → 27,6
#
 
#include <arch/context_offset.h>
#include <arch/stack.h>
.text
 
73,7 → 72,7
 
context_save_arch:
save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
save %sp, -128, %sp
CONTEXT_STORE %i0
 
# context_save returns 1
82,10 → 81,10
restore %sp, 128, %sp
context_restore_arch:
save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
save %sp, -128, %sp
CONTEXT_LOAD %i0
 
# context_restore returns 0
xor %i0, %i0, %i0
ret
restore %sp, STACK_WINDOW_SAVE_AREA_SIZE, %sp
restore %sp, 128, %sp
/kernel/trunk/arch/sparc64/include/stack.h
File deleted
/kernel/trunk/arch/sparc64/include/context.h
29,8 → 29,6
#ifndef __sparc64_CONTEXT_H__
#define __sparc64_CONTEXT_H__
 
#include <arch/stack.h>
 
#ifndef __sparc64_TYPES_H__
# include <arch/types.h>
#endif
39,8 → 37,22
# include <align.h>
#endif
 
#define SP_DELTA STACK_WINDOW_SAVE_AREA_SIZE
/** According to SPARC Compliance Definition, every stack frame is 16-byte aligned. */
#define STACK_ALIGNMENT 16
 
#define STACK_ITEM_SIZE sizeof(__u64)
 
/**
* 16-extended-word save area for %i[0-7] and %l[0-7] registers.
*/
#define SAVE_AREA (16*STACK_ITEM_SIZE)
#define SP_DELTA SAVE_AREA
 
/**
* By convention, the actual top of the stack is %sp + BIAS.
*/
#define BIAS 2047
 
#ifdef context_set
#undef context_set
#endif
47,7 → 59,7
 
#define context_set(c, _pc, stack, size) \
(c)->pc = ((__address) _pc) - 8; \
(c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA)
(c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (BIAS + SP_DELTA)
 
/*
* Only save registers that must be preserved across