1 /**************************************************************************** 2 * 3 * Open Watcom Project 4 * 5 * Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. 6 * 7 * ======================================================================== 8 * 9 * This file contains Original Code and/or Modifications of Original 10 * Code as defined in and that are subject to the Sybase Open Watcom 11 * Public License version 1.0 (the 'License'). You may not use this file 12 * except in compliance with the License. BY USING THIS FILE YOU AGREE TO 13 * ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is 14 * provided with the Original Code and Modifications, and is also 15 * available at www.sybase.com/developer/opensource. 16 * 17 * The Original Code and all software distributed under the License are 18 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 19 * EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM 20 * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR 22 * NON-INFRINGEMENT. Please see the License for the specific language 23 * governing rights and limitations under the License. 24 * 25 * ======================================================================== 26 * 27 * Description: declarations for assume.c 28 * 29 ****************************************************************************/ 30 31 #ifndef _ASSUME_H_ 32 #define _ASSUME_H_ 33 34 /* flags for error field, used for GPR's ASSUME:ERROR|NOTHING */ 35 enum err_flags { 36 RL_ERROR = 0x01, 37 RX_ERROR = 0x02, 38 ERX_ERROR = 0x04, 39 RRX_ERROR = 0x08, 40 RH_ERROR = 0x10 41 }; 42 43 struct assume_info { 44 struct asym *symbol; /* segment, group or type that is to 45 be associated with the register */ 46 unsigned char error; /* register assumed to ERROR */ 47 unsigned char is_flat; /* register assumed to FLAT */ 48 }; 49 50 /* v2.05: introduced */ 51 struct stdassume_typeinfo { 52 struct asym *type; 53 struct asym *target_type; 54 enum memtype mem_type; 55 unsigned char ptr_memtype; 56 unsigned char is_ptr; 57 }; 58 59 /* segment assume table is sorted by seg reg number: ES,CS,SS,DS,FS,GS. 60 * see enum assume_segreg in globals.h. 61 */ 62 extern struct assume_info SegAssumeTable[]; 63 64 /* standard register assume table; contains 8/16 entries for the GPRs */ 65 extern struct assume_info StdAssumeTable[]; 66 67 #define NUM_SEGREGS 6 68 69 extern void AssumeInit( int ); /* init assume tables */ 70 71 extern enum assume_segreg search_assume( const struct asym *sym, enum assume_segreg def, bool search_grps ); 72 extern enum assume_segreg GetAssume( const struct asym *, const struct asym *, enum assume_segreg, struct asym * * ); 73 74 extern struct asym *GetOverrideAssume( enum assume_segreg ); 75 extern struct asym *GetStdAssume( int ); 76 extern struct asym *GetStdAssumeEx( int ); 77 78 extern void ModelAssumeInit( void ); 79 extern void SetSegAssumeTable( void * ); 80 extern void GetSegAssumeTable( void * ); 81 extern void SetStdAssumeTable( void *, struct stdassume_typeinfo * ); 82 extern void GetStdAssumeTable( void *, struct stdassume_typeinfo * ); 83 84 #endif 85