github.com/dannin/go@v0.0.0-20161031215817-d35dfd405eaa/src/cmd/internal/obj/mips/a.out.go (about) 1 // cmd/9c/9.out.h from Vita Nuova. 2 // 3 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 4 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 5 // Portions Copyright © 1997-1999 Vita Nuova Limited 6 // Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com) 7 // Portions Copyright © 2004,2006 Bruce Ellis 8 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 9 // Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others 10 // Portions Copyright © 2009 The Go Authors. All rights reserved. 11 // 12 // Permission is hereby granted, free of charge, to any person obtaining a copy 13 // of this software and associated documentation files (the "Software"), to deal 14 // in the Software without restriction, including without limitation the rights 15 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 // copies of the Software, and to permit persons to whom the Software is 17 // furnished to do so, subject to the following conditions: 18 // 19 // The above copyright notice and this permission notice shall be included in 20 // all copies or substantial portions of the Software. 21 // 22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 // THE SOFTWARE. 29 30 package mips 31 32 import "cmd/internal/obj" 33 34 //go:generate go run ../stringer.go -i $GOFILE -o anames.go -p mips 35 36 /* 37 * mips 64 38 */ 39 const ( 40 NSNAME = 8 41 NSYM = 50 42 NREG = 32 /* number of general registers */ 43 NFREG = 32 /* number of floating point registers */ 44 ) 45 46 const ( 47 REG_R0 = obj.RBaseMIPS64 + iota 48 REG_R1 49 REG_R2 50 REG_R3 51 REG_R4 52 REG_R5 53 REG_R6 54 REG_R7 55 REG_R8 56 REG_R9 57 REG_R10 58 REG_R11 59 REG_R12 60 REG_R13 61 REG_R14 62 REG_R15 63 REG_R16 64 REG_R17 65 REG_R18 66 REG_R19 67 REG_R20 68 REG_R21 69 REG_R22 70 REG_R23 71 REG_R24 72 REG_R25 73 REG_R26 74 REG_R27 75 REG_R28 76 REG_R29 77 REG_R30 78 REG_R31 79 80 REG_F0 81 REG_F1 82 REG_F2 83 REG_F3 84 REG_F4 85 REG_F5 86 REG_F6 87 REG_F7 88 REG_F8 89 REG_F9 90 REG_F10 91 REG_F11 92 REG_F12 93 REG_F13 94 REG_F14 95 REG_F15 96 REG_F16 97 REG_F17 98 REG_F18 99 REG_F19 100 REG_F20 101 REG_F21 102 REG_F22 103 REG_F23 104 REG_F24 105 REG_F25 106 REG_F26 107 REG_F27 108 REG_F28 109 REG_F29 110 REG_F30 111 REG_F31 112 113 REG_HI 114 REG_LO 115 116 // co-processor 0 control registers 117 REG_M0 118 REG_M1 119 REG_M2 120 REG_M3 121 REG_M4 122 REG_M5 123 REG_M6 124 REG_M7 125 REG_M8 126 REG_M9 127 REG_M10 128 REG_M11 129 REG_M12 130 REG_M13 131 REG_M14 132 REG_M15 133 REG_M16 134 REG_M17 135 REG_M18 136 REG_M19 137 REG_M20 138 REG_M21 139 REG_M22 140 REG_M23 141 REG_M24 142 REG_M25 143 REG_M26 144 REG_M27 145 REG_M28 146 REG_M29 147 REG_M30 148 REG_M31 149 150 // FPU control registers 151 REG_FCR0 152 REG_FCR1 153 REG_FCR2 154 REG_FCR3 155 REG_FCR4 156 REG_FCR5 157 REG_FCR6 158 REG_FCR7 159 REG_FCR8 160 REG_FCR9 161 REG_FCR10 162 REG_FCR11 163 REG_FCR12 164 REG_FCR13 165 REG_FCR14 166 REG_FCR15 167 REG_FCR16 168 REG_FCR17 169 REG_FCR18 170 REG_FCR19 171 REG_FCR20 172 REG_FCR21 173 REG_FCR22 174 REG_FCR23 175 REG_FCR24 176 REG_FCR25 177 REG_FCR26 178 REG_FCR27 179 REG_FCR28 180 REG_FCR29 181 REG_FCR30 182 REG_FCR31 183 184 REG_LAST = REG_FCR31 // the last defined register 185 186 REG_SPECIAL = REG_M0 187 188 REGZERO = REG_R0 /* set to zero */ 189 REGSP = REG_R29 190 REGSB = REG_R28 191 REGLINK = REG_R31 192 REGRET = REG_R1 193 REGARG = -1 /* -1 disables passing the first argument in register */ 194 REGRT1 = REG_R1 /* reserved for runtime, duffzero and duffcopy */ 195 REGRT2 = REG_R2 /* reserved for runtime, duffcopy */ 196 REGCTXT = REG_R22 /* context for closures */ 197 REGG = REG_R30 /* G */ 198 REGTMP = REG_R23 /* used by the linker */ 199 FREGRET = REG_F0 200 ) 201 202 const ( 203 BIG = 32766 204 ) 205 206 const ( 207 /* mark flags */ 208 FOLL = 1 << 0 209 LABEL = 1 << 1 210 LEAF = 1 << 2 211 SYNC = 1 << 3 212 BRANCH = 1 << 4 213 LOAD = 1 << 5 214 FCMP = 1 << 6 215 NOSCHED = 1 << 7 216 217 NSCHED = 20 218 ) 219 220 const ( 221 C_NONE = iota 222 C_REG 223 C_FREG 224 C_FCREG 225 C_MREG /* special processor register */ 226 C_HI 227 C_LO 228 C_ZCON 229 C_SCON /* 16 bit signed */ 230 C_UCON /* 32 bit signed, low 16 bits 0 */ 231 C_ADD0CON 232 C_AND0CON 233 C_ADDCON /* -0x8000 <= v < 0 */ 234 C_ANDCON /* 0 < v <= 0xFFFF */ 235 C_LCON /* other 32 */ 236 C_DCON /* other 64 (could subdivide further) */ 237 C_SACON /* $n(REG) where n <= int16 */ 238 C_SECON 239 C_LACON /* $n(REG) where int16 < n <= int32 */ 240 C_LECON 241 C_DACON /* $n(REG) where int32 < n */ 242 C_STCON /* $tlsvar */ 243 C_SBRA 244 C_LBRA 245 C_SAUTO 246 C_LAUTO 247 C_SEXT 248 C_LEXT 249 C_ZOREG 250 C_SOREG 251 C_LOREG 252 C_GOK 253 C_ADDR 254 C_TLS 255 C_TEXTSIZE 256 257 C_NCLASS /* must be the last */ 258 ) 259 260 const ( 261 AABSD = obj.ABaseMIPS64 + obj.A_ARCHSPECIFIC + iota 262 AABSF 263 AABSW 264 AADD 265 AADDD 266 AADDF 267 AADDU 268 AADDW 269 AAND 270 ABEQ 271 ABFPF 272 ABFPT 273 ABGEZ 274 ABGEZAL 275 ABGTZ 276 ABLEZ 277 ABLTZ 278 ABLTZAL 279 ABNE 280 ABREAK 281 ACMPEQD 282 ACMPEQF 283 ACMPGED 284 ACMPGEF 285 ACMPGTD 286 ACMPGTF 287 ADIV 288 ADIVD 289 ADIVF 290 ADIVU 291 ADIVW 292 AGOK 293 ALUI 294 AMOVB 295 AMOVBU 296 AMOVD 297 AMOVDF 298 AMOVDW 299 AMOVF 300 AMOVFD 301 AMOVFW 302 AMOVH 303 AMOVHU 304 AMOVW 305 AMOVWD 306 AMOVWF 307 AMOVWL 308 AMOVWR 309 AMUL 310 AMULD 311 AMULF 312 AMULU 313 AMULW 314 ANEGD 315 ANEGF 316 ANEGW 317 ANOR 318 AOR 319 AREM 320 AREMU 321 ARFE 322 ASGT 323 ASGTU 324 ASLL 325 ASRA 326 ASRL 327 ASUB 328 ASUBD 329 ASUBF 330 ASUBU 331 ASUBW 332 ASYSCALL 333 ATLBP 334 ATLBR 335 ATLBWI 336 ATLBWR 337 AWORD 338 AXOR 339 340 /* 64-bit */ 341 AMOVV 342 AMOVVL 343 AMOVVR 344 ASLLV 345 ASRAV 346 ASRLV 347 ADIVV 348 ADIVVU 349 AREMV 350 AREMVU 351 AMULV 352 AMULVU 353 AADDV 354 AADDVU 355 ASUBV 356 ASUBVU 357 358 /* 64-bit FP */ 359 ATRUNCFV 360 ATRUNCDV 361 ATRUNCFW 362 ATRUNCDW 363 AMOVWU 364 AMOVFV 365 AMOVDV 366 AMOVVF 367 AMOVVD 368 369 ALAST 370 371 // aliases 372 AJMP = obj.AJMP 373 AJAL = obj.ACALL 374 ARET = obj.ARET 375 )