github.com/rohankumardubey/syslog-redirector-golang@v0.0.0-20140320174030-4859f03d829a/src/cmd/5l/5.out.h (about) 1 // Inferno utils/5c/5.out.h 2 // http://code.google.com/p/inferno-os/source/browse/utils/5c/5.out.h 3 // 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 6 // Portions Copyright © 1997-1999 Vita Nuova Limited 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com) 8 // Portions Copyright © 2004,2006 Bruce Ellis 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others 11 // Portions Copyright © 2009 The Go Authors. All rights reserved. 12 // 13 // Permission is hereby granted, free of charge, to any person obtaining a copy 14 // of this software and associated documentation files (the "Software"), to deal 15 // in the Software without restriction, including without limitation the rights 16 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 // copies of the Software, and to permit persons to whom the Software is 18 // furnished to do so, subject to the following conditions: 19 // 20 // The above copyright notice and this permission notice shall be included in 21 // all copies or substantial portions of the Software. 22 // 23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 // THE SOFTWARE. 30 31 #define NSNAME 8 32 #define NSYM 50 33 #define NREG 16 34 #include "../ld/textflag.h" 35 36 #define REGRET 0 37 /* -1 disables use of REGARG */ 38 #define REGARG -1 39 /* compiler allocates R1 up as temps */ 40 /* compiler allocates register variables R3 up */ 41 #define REGEXT 10 42 /* these two registers are declared in runtime.h */ 43 #define REGG (REGEXT-0) 44 #define REGM (REGEXT-1) 45 /* compiler allocates external registers R10 down */ 46 #define REGTMP 11 47 #define REGSP 13 48 #define REGLINK 14 49 #define REGPC 15 50 51 #define NFREG 16 52 #define FREGRET 0 53 #define FREGEXT 7 54 #define FREGTMP 15 55 /* compiler allocates register variables F0 up */ 56 /* compiler allocates external registers F7 down */ 57 58 enum as 59 { 60 AXXX, 61 62 AAND, 63 AEOR, 64 ASUB, 65 ARSB, 66 AADD, 67 AADC, 68 ASBC, 69 ARSC, 70 ATST, 71 ATEQ, 72 ACMP, 73 ACMN, 74 AORR, 75 ABIC, 76 77 AMVN, 78 79 AB, 80 ABL, 81 82 /* 83 * Do not reorder or fragment the conditional branch 84 * opcodes, or the predication code will break 85 */ 86 ABEQ, 87 ABNE, 88 ABCS, 89 ABHS, 90 ABCC, 91 ABLO, 92 ABMI, 93 ABPL, 94 ABVS, 95 ABVC, 96 ABHI, 97 ABLS, 98 ABGE, 99 ABLT, 100 ABGT, 101 ABLE, 102 103 AMOVWD, 104 AMOVWF, 105 AMOVDW, 106 AMOVFW, 107 AMOVFD, 108 AMOVDF, 109 AMOVF, 110 AMOVD, 111 112 ACMPF, 113 ACMPD, 114 AADDF, 115 AADDD, 116 ASUBF, 117 ASUBD, 118 AMULF, 119 AMULD, 120 ADIVF, 121 ADIVD, 122 ASQRTF, 123 ASQRTD, 124 AABSF, 125 AABSD, 126 127 ASRL, 128 ASRA, 129 ASLL, 130 AMULU, 131 ADIVU, 132 AMUL, 133 ADIV, 134 AMOD, 135 AMODU, 136 137 AMOVB, 138 AMOVBS, 139 AMOVBU, 140 AMOVH, 141 AMOVHS, 142 AMOVHU, 143 AMOVW, 144 AMOVM, 145 ASWPBU, 146 ASWPW, 147 148 ANOP, 149 ARFE, 150 ASWI, 151 AMULA, 152 153 ADATA, 154 AGLOBL, 155 AGOK, 156 AHISTORY, 157 ANAME, 158 ARET, 159 ATEXT, 160 AWORD, 161 ADYNT_, 162 AINIT_, 163 ABCASE, 164 ACASE, 165 166 AEND, 167 168 AMULL, 169 AMULAL, 170 AMULLU, 171 AMULALU, 172 173 ABX, 174 ABXRET, 175 ADWORD, 176 177 ASIGNAME, 178 179 ALDREX, 180 ASTREX, 181 182 ALDREXD, 183 ASTREXD, 184 185 APLD, 186 187 AUNDEF, 188 189 ACLZ, 190 191 AMULWT, 192 AMULWB, 193 AMULAWT, 194 AMULAWB, 195 196 AUSEFIELD, 197 ATYPE, 198 AFUNCDATA, 199 APCDATA, 200 ACHECKNIL, 201 202 ALAST, 203 }; 204 205 /* scond byte */ 206 #define C_SCOND ((1<<4)-1) 207 #define C_SBIT (1<<4) 208 #define C_PBIT (1<<5) 209 #define C_WBIT (1<<6) 210 #define C_FBIT (1<<7) /* psr flags-only */ 211 #define C_UBIT (1<<7) /* up bit, unsigned bit */ 212 213 #define C_SCOND_EQ 0 214 #define C_SCOND_NE 1 215 #define C_SCOND_HS 2 216 #define C_SCOND_LO 3 217 #define C_SCOND_MI 4 218 #define C_SCOND_PL 5 219 #define C_SCOND_VS 6 220 #define C_SCOND_VC 7 221 #define C_SCOND_HI 8 222 #define C_SCOND_LS 9 223 #define C_SCOND_GE 10 224 #define C_SCOND_LT 11 225 #define C_SCOND_GT 12 226 #define C_SCOND_LE 13 227 #define C_SCOND_NONE 14 228 #define C_SCOND_NV 15 229 230 /* D_SHIFT type */ 231 #define SHIFT_LL 0<<5 232 #define SHIFT_LR 1<<5 233 #define SHIFT_AR 2<<5 234 #define SHIFT_RR 3<<5 235 236 /* type/name */ 237 #define D_GOK 0 238 #define D_NONE 1 239 240 /* type */ 241 #define D_BRANCH (D_NONE+1) 242 #define D_OREG (D_NONE+2) 243 #define D_CONST (D_NONE+7) 244 #define D_FCONST (D_NONE+8) 245 #define D_SCONST (D_NONE+9) 246 #define D_PSR (D_NONE+10) 247 #define D_REG (D_NONE+12) 248 #define D_FREG (D_NONE+13) 249 #define D_FILE (D_NONE+16) 250 #define D_OCONST (D_NONE+17) 251 #define D_FILE1 (D_NONE+18) 252 253 #define D_SHIFT (D_NONE+19) 254 #define D_FPCR (D_NONE+20) 255 #define D_REGREG (D_NONE+21) // (reg, reg) 256 #define D_ADDR (D_NONE+22) 257 258 #define D_SBIG (D_NONE+23) 259 #define D_CONST2 (D_NONE+24) 260 261 #define D_REGREG2 (D_NONE+25) // reg, reg 262 263 /* name */ 264 #define D_EXTERN (D_NONE+3) 265 #define D_STATIC (D_NONE+4) 266 #define D_AUTO (D_NONE+5) 267 #define D_PARAM (D_NONE+6) 268 269 /* internal only */ 270 #define D_SIZE (D_NONE+40) 271 #define D_PCREL (D_NONE+41) 272 #define D_GOTOFF (D_NONE+42) // R_ARM_GOTOFF 273 #define D_PLT0 (D_NONE+43) // R_ARM_PLT32, 1st inst: add ip, pc, #0xNN00000 274 #define D_PLT1 (D_NONE+44) // R_ARM_PLT32, 2nd inst: add ip, ip, #0xNN000 275 #define D_PLT2 (D_NONE+45) // R_ARM_PLT32, 3rd inst: ldr pc, [ip, #0xNNN]! 276 #define D_CALL (D_NONE+46) // R_ARM_PLT32/R_ARM_CALL/R_ARM_JUMP24, bl xxxxx or b yyyyy 277 #define D_TLS (D_NONE+47) // R_ARM_TLS_LE32 278 279 /* 280 * this is the ranlib header 281 */ 282 #define SYMDEF "__.GOSYMDEF" 283 284 /* 285 * this is the simulated IEEE floating point 286 */ 287 typedef struct ieee Ieee; 288 struct ieee 289 { 290 int32 l; /* contains ls-man 0xffffffff */ 291 int32 h; /* contains sign 0x80000000 292 exp 0x7ff00000 293 ms-man 0x000fffff */ 294 };