Changeset df91be5 in mainline for arch/sparc64/include/context.h


Ignore:
Timestamp:
2005-10-30T17:29:08Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e90b4e
Parents:
437ee6a4
Message:

sparc64 work.
Adjust context_set() to be SCD compliant.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/include/context.h

    r437ee6a4 rdf91be5  
    3838#endif
    3939
    40 #define STACK_ALIGNMENT                 8
    41 #define STACK_ITEM_SIZE                 8
     40/** According to SPARC Compliance Definition, every stack frame is 16-byte aligned. */
     41#define STACK_ALIGNMENT                 16
    4242
    43 /*
    44  * One item is put onto the stack to support get_stack_base().
     43#define STACK_ITEM_SIZE                 sizeof(__u64)
     44
     45/**
     46 * 16-extended-word save area for %i[0-7] and %l[0-7] registers.
    4547 */
    46 #define SP_DELTA        (0+STACK_ITEM_SIZE)
     48#define SAVE_AREA       (16*STACK_ITEM_SIZE)
     49#define SP_DELTA        SAVE_AREA
     50
     51/**
     52 * By convention, the actual top of the stack is %sp + BIAS.
     53 */
     54#define BIAS            2047
    4755
    4856#ifdef context_set
     
    5260#define context_set(c, _pc, stack, size)                                                                \
    5361        (c)->pc = ((__address) _pc) - 8;                                                                \
    54         (c)->sp = ((__address) stack) + (ALIGN((size), STACK_ALIGNMENT) + 1) - SP_DELTA;                       
     62        (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (BIAS + SP_DELTA)
    5563
    5664/*
Note: See TracChangeset for help on using the changeset viewer.