|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: #ifndef _MACHDEP_PPC_FRAME_ ! 26: #define _MACHDEP_PPC_FRAME_ ! 27: ! 28: #ifndef __ASSEMBLER__ ! 29: /* ! 30: * Frame Marker ! 31: */ ! 32: #ifndef LOCORE ! 33: /* ! 34: ** These are defined int the PowerPC Runtime Conventions Doc ch 4 ! 35: */ ! 36: struct linkage_area { ! 37: int saved_sp; /* Back chain */ ! 38: int saved_cr; /* Link Save word */ ! 39: int saved_lr; /* Local variable space */ ! 40: int saved_rsv0; /* FPSCR save area */ ! 41: int saved_rsv1; /* CR save area */ ! 42: int saved_r2; /* General register save area */ ! 43: }; ! 44: typedef struct linkage_area linkage_area_t; ! 45: typedef linkage_area_t *linkage_areaPtr_t; ! 46: ! 47: struct reg_param_area { ! 48: int saved_p0; ! 49: int saved_p1; ! 50: int saved_p2; ! 51: int saved_p3; ! 52: int saved_p4; ! 53: int saved_p5; ! 54: int saved_p6; ! 55: int saved_p7; ! 56: }; ! 57: typedef struct reg_param_area reg_param_area_t; ! 58: typedef reg_param_area_t *reg_param_areaPtr_t; ! 59: ! 60: ! 61: struct stack_param_area { ! 62: int saved_p8; ! 63: int saved_p9; ! 64: int saved_p10; ! 65: int saved_p11; ! 66: }; ! 67: typedef struct stack_param_area stack_param_area_t; ! 68: typedef stack_param_area_t *stack_param_areaPtr_t; ! 69: ! 70: struct frame_area { ! 71: struct linkage_area la; ! 72: struct reg_param_area rpa; ! 73: struct stack_param_area spa; ! 74: }; ! 75: typedef struct frame_area frame_area_t; ! 76: typedef frame_area_t *frame_areaPtr_t; ! 77: ! 78: struct param_area { ! 79: struct reg_param_area rpa; ! 80: struct stack_param_area spa; ! 81: }; ! 82: typedef struct param_area param_area_t; ! 83: typedef param_area_t *param_areaPtr_t; ! 84: ! 85: struct stack_frame { ! 86: struct linkage_area la; ! 87: struct param_area pa; ! 88: }; ! 89: typedef struct stack_area stack_area_t; ! 90: typedef stack_area_t *stack_areaPtr_t; ! 91: ! 92: /* ! 93: ** some helpful defines ! 94: */ ! 95: #define NARGS (sizeof(struct param_area)/ sizeof(int)) ! 96: #define MAXREGARGS (sizeof(struct reg_param_area)/ sizeof(int)) ! 97: ! 98: ! 99: ! 100: ! 101: /* ! 102: * redzone is the area under the stack pointer which must be preserved ! 103: * when taking a trap, interrupt etc. This is no longer needed as gcc ! 104: * (2.7.2 and above) now follows ELF spec correctly and never loads/stores ! 105: * below the frame pointer ! 106: */ ! 107: struct redzone { ! 108: /* save register area */ ! 109: int save_reg13; ! 110: int save_reg14; ! 111: int save_reg15; ! 112: int save_reg16; ! 113: int save_reg17; ! 114: int save_reg18; ! 115: int save_reg19; ! 116: int save_reg20; ! 117: int save_reg21; ! 118: int save_reg22; ! 119: int save_reg23; ! 120: int save_reg24; ! 121: int save_reg25; ! 122: int save_reg26; ! 123: int save_reg27; ! 124: int save_reg28; ! 125: int save_reg29; ! 126: int save_reg30; ! 127: int save_reg31; ! 128: ! 129: double save_fpu14; ! 130: double save_fpu15; ! 131: double save_fpu16; ! 132: double save_fpu17; ! 133: double save_fpu18; ! 134: double save_fpu19; ! 135: double save_fpu20; ! 136: double save_fpu21; ! 137: double save_fpu22; ! 138: double save_fpu23; ! 139: double save_fpu24; ! 140: double save_fpu25; ! 141: double save_fpu26; ! 142: double save_fpu27; ! 143: double save_fpu28; ! 144: double save_fpu29; ! 145: double save_fpu30; ! 146: double save_fpu31; ! 147: ! 148: int round; ! 149: }; ! 150: #endif ! 151: ! 152: #endif /* __ASSEMBLER__ */ ! 153: ! 154: /* ! 155: * Useful Constants ! 156: */ ! 157: #define NUMARGREGS 8 /* number of arguments in registers */ ! 158: ! 159: /* ! 160: * Assembly Language Offsets for Argument or Stack Pointer ! 161: * to Status Save and Function Return Areas ! 162: * (should use genassym to get these offsets) ! 163: */ ! 164: ! 165: #endif /* _MACHDEP_PPC_FRAME_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.