1 #define NSNAME 8 2 #define NSYM 50 3 #define NREG 16 4 5 #define NOPROF (1<<0) 6 #define DUPOK (1<<1) 7 #define ALLTHUMBS (1<<2) 8 9 #define REGRET 0 10 #define REGARG 0 11 /* compiler allocates R1 up as temps */ 12 /* compiler allocates register variables R3 up */ 13 #define REGEXT 6 14 /* compiler allocates external registers R5 down */ 15 #define REGTMPT 7 /* used by the loader - thumb */ 16 #define REGTMP 11 /* used by the loader - arm */ 17 #define REGSB 12 18 #define REGSP 13 19 #define REGLINK 14 20 #define REGPC 15 21 22 #define NFREG 8 23 #define FREGRET 0 24 #define FREGEXT 7 25 /* compiler allocates register variables F0 up */ 26 /* compiler allocates external registers F7 down */ 27 28 enum as 29 { 30 31 AXXX, 32 33 AAND, 34 AEOR, 35 ASUB, 36 ARSB, // not used 37 AADD, 38 AADC, 39 ASBC, 40 ARSC, // not used 41 ATST, 42 ATEQ, // not used 43 ACMP, 44 ACMN, 45 AORR, 46 ABIC, 47 48 AMVN, 49 50 AB, 51 ABL, 52 53 /* 54 * Do not reorder or fragment the conditional branch 55 * opcodes, or the predication code will break 56 */ 57 58 ABEQ, 59 ABNE, 60 ABCS, 61 ABHS, 62 ABCC, 63 ABLO, 64 ABMI, 65 ABPL, 66 ABVS, 67 ABVC, 68 ABHI, 69 ABLS, 70 ABGE, 71 ABLT, 72 ABGT, 73 ABLE, 74 75 AMOVWD, 76 AMOVWF, 77 AMOVDW, 78 AMOVFW, 79 AMOVFD, 80 AMOVDF, 81 AMOVF, 82 AMOVD, 83 84 ACMPF, 85 ACMPD, 86 AADDF, 87 AADDD, 88 ASUBF, 89 ASUBD, 90 AMULF, 91 AMULD, 92 ADIVF, 93 ADIVD, 94 95 ASRL, // right logical 96 ASRA, // right arithmetic 97 ASLL, // left logical = left arithmetic 98 AMULU, 99 ADIVU, 100 AMUL, 101 ADIV, 102 AMOD, 103 AMODU, 104 105 AMOVB, 106 AMOVBU, 107 AMOVH, 108 AMOVHU, 109 AMOVW, 110 AMOVM, 111 ASWPBU, // not used 112 ASWPW, // not used 113 114 ANOP, 115 ARFE, 116 ASWI, 117 AMULA, // not used 118 119 ADATA, 120 AGLOBL, 121 AGOK, 122 AHISTORY, 123 ANAME, 124 ARET, // fn return 125 ATEXT, // fn start 126 AWORD, 127 ADYNT, // not used 128 AINIT, // not used 129 ABCASE, // not used 130 ACASE, // not used 131 132 AEND, 133 134 AMULL, 135 AMULAL, 136 AMULLU, 137 AMULALU, 138 139 ABX, 140 ABXRET, 141 142 ADWORD, 143 144 ASIGNAME, 145 146 ALAST, 147 148 }; 149 150 /* type/name */ 151 #define D_GOK 0 152 #define D_NONE 1 153 154 /* type */ 155 #define D_BRANCH (D_NONE+1) 156 #define D_OREG (D_NONE+2) 157 #define D_CONST (D_NONE+7) 158 #define D_FCONST (D_NONE+8) 159 #define D_SCONST (D_NONE+9) 160 #define D_PSR (D_NONE+10) 161 #define D_REG (D_NONE+12) 162 #define D_FREG (D_NONE+13) 163 #define D_FILE (D_NONE+16) 164 #define D_OCONST (D_NONE+17) 165 #define D_FILE1 (D_NONE+18) 166 167 #define D_SHIFT (D_NONE+19) /* not used */ 168 #define D_FPCR (D_NONE+20) 169 #define D_REGREG (D_NONE+21) 170 171 /* name */ 172 #define D_EXTERN (D_NONE+3) 173 #define D_STATIC (D_NONE+4) 174 #define D_AUTO (D_NONE+5) 175 #define D_PARAM (D_NONE+6) 176 177 /* 178 * this is the ranlib header 179 */ 180 #define SYMDEF "__.SYMDEF" 181 182 /* 183 * this is the simulated IEEE floating point 184 */ 185 typedef struct ieee Ieee; 186 struct ieee 187 { 188 long l; /* contains ls-man 0xffffffff */ 189 long h; /* contains sign 0x80000000 190 exp 0x7ff00000 191 ms-man 0x000fffff */ 192 }; 193