|
|
1.1 root 1: /* @(#)oper.h 1.1 86/02/03 SMI */
2:
3: /*
4: * Copyright (c) 1985 by Sun Microsystems, Inc.
5: */
6:
7: /* operand types */
8: /* T_PCPLUS used inside ins.c only! */
9: typedef enum { T_NULL=0, T_REG, T_DEFER, T_POSTINC, T_PREDEC, T_DISPL, T_INDEX,
10: T_ABSS, T_ABSL, T_IMMED, T_NORMAL,
11: T_REGPAIR, T_STRING, T_FLOAT, T_DOUBLE, T_PCPLUS,
12: T_REGLIST,T_FREGLIST,T_FCREGLIST
13: } operand_t;
14:
15:
16: /* operand structure */
17: struct oper {
18: operand_t type_o :8; /* operand type info */
19: unsigned flags_o:16, /* operand flags */
20: reg_o:8, /* Register subfield value */
21: scale_o:8; /* index scale factor */
22: struct sym_bkt *sym_o; /* symbol used for relocation */
23: struct sym_bkt *sym2_o; /* symbol used for relocation */
24: #if C2
25: struct oper *nsym_o; /* chain of users of this symbol */
26: #endif
27: long value_o; /* register # for T_REG, offset for T_DISPL */
28: long disp_o; /* displacement value for index mode */
29: float fval_o; /* floating-point value for T_FLOAT */
30: double dval_o; /* floating-point value for T_DOUBLE */
31: operand_t immed_o ; /* Type of immediate operand. */
32: char * stringval_o; /* string pointer for T_STRING */
33: long disp2_o; /* displacement value for full index mode */
34: unsigned access_o; /* access bits */
35: int bfoffset_o; /* bit-field offset modifier */
36: int bfwidth_o; /* bit-field width modifier */
37:
38: };
39:
40: /* operand flags */
41: #define O_WINDEX 1
42: #define O_LINDEX 2
43: #define O_COMPLEX 4
44: #define O_BFLD 010 /* bit field modifier */
45: /* modifiers for full indexing mode */
46: #define O_BSUPRESS 020 /* base supress */
47: #define O_INDIRECT 040 /* memory indirect */
48: #define O_POSTINDEX 0100 /* index after indirection */
49: #define O_PREINDEX 0200 /* index before indirection */
50: #define O_WDISP 0400 /* word-length displacement */
51: #define O_LDISP 01000 /* long-length displacement */
52: #define O_LDISP2 02000 /* long-length 2nd displacement */
53: #define O_WDISP2 04000 /* word-length 2nd displacement */
54: /* modifiers for bit fields */
55: #define O_BFOREG 010000 /* offset field is a register */
56: #define O_BFWREG 020000 /* width field is a register */
57: #define O_BDISP 040000 /* byte-length displacement */
58:
59: struct optree {
60: struct oper *right_t;
61: struct oper *left_t;
62: char op_t;
63: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.