Changeset 22e10ab in mainline
- Timestamp:
- 2005-12-01T13:52:13Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 414f59c
- Parents:
- 74813216
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/sparc64/include/context.h
r74813216 r22e10ab 50 50 #define context_set(c, _pc, stack, size) \ 51 51 (c)->pc = ((__address) _pc) - 8; \ 52 (c)->fp = NULL; \53 52 (c)->sp = ((__address) stack) + ALIGN((size), STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA) 54 53 … … 59 58 */ 60 59 struct context { 61 __u64 i1; 62 __u64 i2; 63 __u64 i3; 64 __u64 i4; 65 __u64 i5; 66 __address fp; /* %i6 */ 67 __address pc; /* %i7 */ 68 __address sp; 60 __u64 o1; 61 __u64 o2; 62 __u64 o3; 63 __u64 o4; 64 __u64 o5; 65 __address sp; /* %o6 */ 66 __address pc; /* %o7 */ 69 67 ipl_t ipl; 70 68 }; -
arch/sparc64/include/context_offset.h
r74813216 r22e10ab 1 1 /* This file is automatically generated by gencontext.c. */ 2 2 /* struct context */ 3 #define OFFSET_SP 0x38 4 #define OFFSET_FP 0x28 3 #define OFFSET_O1 0x0 4 #define OFFSET_O2 0x8 5 #define OFFSET_O3 0x10 6 #define OFFSET_O4 0x18 7 #define OFFSET_O5 0x20 8 #define OFFSET_SP 0x28 5 9 #define OFFSET_PC 0x30 6 #define OFFSET_I1 0x07 #define OFFSET_I2 0x88 #define OFFSET_I3 0x109 #define OFFSET_I4 0x1810 #define OFFSET_I5 0x20 -
arch/sparc64/src/context.S
r74813216 r22e10ab 36 36 37 37 .macro CONTEXT_STORE r 38 stx %i1, [\r + OFFSET_I1] 39 stx %i2, [\r + OFFSET_I2] 40 stx %i3, [\r + OFFSET_I3] 41 stx %i4, [\r + OFFSET_I4] 42 stx %i5, [\r + OFFSET_I5] 43 stx %fp, [\r + OFFSET_FP] 44 stx %i7, [\r + OFFSET_PC] 38 stx %o1, [\r + OFFSET_I1] 39 stx %o2, [\r + OFFSET_I2] 40 stx %o3, [\r + OFFSET_I3] 41 stx %o4, [\r + OFFSET_I4] 42 stx %o5, [\r + OFFSET_I5] 43 stx %o7, [\r + OFFSET_PC] 45 44 stx %sp, [\r + OFFSET_SP] 46 45 .endm 47 46 48 47 .macro CONTEXT_LOAD r 49 ldx [\r + OFFSET_I1], %i1 50 ldx [\r + OFFSET_I2], %i2 51 ldx [\r + OFFSET_I3], %i3 52 ldx [\r + OFFSET_I4], %i4 53 ldx [\r + OFFSET_I5], %i5 54 ldx [\r + OFFSET_FP], %fp 55 ldx [\r + OFFSET_PC], %i7 48 ldx [\r + OFFSET_I1], %o1 49 ldx [\r + OFFSET_I2], %o2 50 ldx [\r + OFFSET_I3], %o3 51 ldx [\r + OFFSET_I4], %o4 52 ldx [\r + OFFSET_I5], %o5 53 ldx [\r + OFFSET_PC], %o7 56 54 ldx [\r + OFFSET_SP], %sp 57 55 .endm … … 59 57 60 58 context_save_arch: 61 save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp 62 CONTEXT_STORE %i0 59 CONTEXT_STORE %o0 63 60 64 61 # context_save returns 1 65 mov 1, %i0 66 ret 67 restore %sp, STACK_WINDOW_SAVE_AREA_SIZE, %sp 62 retl 63 mov 1, %o0 68 64 69 65 context_restore_arch: 70 save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp 71 CONTEXT_LOAD %i0 66 CONTEXT_LOAD %o0 72 67 73 68 # context_restore returns 0 74 xor %i0, %i0, %i0 75 ret 76 restore %sp, STACK_WINDOW_SAVE_AREA_SIZE, %sp 69 retl 70 xor %o0, %o0, %o0 -
tools/sparc64/gencontext.c
r74813216 r22e10ab 28 28 29 29 fprintf(f,"/* struct context */\n"); 30 30 fprintf(f,"#define OFFSET_O1 0x%x\n",((int)&pctx->o1) - (int )pctx); 31 fprintf(f,"#define OFFSET_O2 0x%x\n",((int)&pctx->o2) - (int )pctx); 32 fprintf(f,"#define OFFSET_O3 0x%x\n",((int)&pctx->o3) - (int )pctx); 33 fprintf(f,"#define OFFSET_O4 0x%x\n",((int)&pctx->o4) - (int )pctx); 34 fprintf(f,"#define OFFSET_O5 0x%x\n",((int)&pctx->o5) - (int )pctx); 31 35 fprintf(f,"#define OFFSET_SP 0x%x\n",((int)&pctx->sp) - (int )pctx); 32 fprintf(f,"#define OFFSET_FP 0x%x\n",((int)&pctx->fp) - (int )pctx);33 36 fprintf(f,"#define OFFSET_PC 0x%x\n",((int)&pctx->pc) - (int )pctx); 34 fprintf(f,"#define OFFSET_I1 0x%x\n",((int)&pctx->i1) - (int )pctx);35 fprintf(f,"#define OFFSET_I2 0x%x\n",((int)&pctx->i2) - (int )pctx);36 fprintf(f,"#define OFFSET_I3 0x%x\n",((int)&pctx->i3) - (int )pctx);37 fprintf(f,"#define OFFSET_I4 0x%x\n",((int)&pctx->i4) - (int )pctx);38 fprintf(f,"#define OFFSET_I5 0x%x\n",((int)&pctx->i5) - (int )pctx);39 37 40 38 fclose(f);
Note:
See TracChangeset
for help on using the changeset viewer.