1 /* Copyright (c) 1980 Regents of the University of California */ 2 static char sccsid[] = "@(#)aspseudo.c 4.3 08/16/80"; 3 #include <stdio.h> 4 #include "as.h" 5 6 #define OP(name, opcode, nargs, arg1, arg2, arg3, arg4, arg5, arg6) \ 7 { \ 8 name, opcode, nargs, arg1, arg2, arg3, arg4, arg5, arg6, \ 9 (nargs == 0 ? INST0:INSTn) \ 10 } 11 #define PSEUDO(name, type, tag) \ 12 { \ 13 name, type, 0, 0, 0, 0, 0, 0, 0, \ 14 tag \ 15 } 16 17 readonly struct Instab instab[] = { 18 PSEUDO(".space", 0, ISPACE), 19 PSEUDO(".fill", 0, IFILL), 20 PSEUDO(".byte", 0, IBYTE), 21 PSEUDO(".word", 0, IWORD), 22 PSEUDO(".long", 0, ILONG), 23 PSEUDO(".int", 0, IINT), 24 PSEUDO(".quad", 0, IQUAD), 25 PSEUDO(".data", 0, IDATA), 26 PSEUDO(".globl", 0, IGLOBAL), 27 PSEUDO(".set", 0, ISET), 28 PSEUDO(".text", 0, ITEXT), 29 PSEUDO(".comm", 0, ICOMM), 30 PSEUDO(".lcomm", 0, ILCOMM), 31 PSEUDO(".lsym", 0, ILSYM), 32 PSEUDO(".align", 0, IALIGN), 33 PSEUDO(".float", 0, IFLOAT), 34 PSEUDO(".double", 0, IDOUBLE), 35 PSEUDO(".org", 0, IORG), 36 PSEUDO(".stab", 0, ISTAB), 37 PSEUDO(".stabs", 0, ISTABSTR), 38 PSEUDO(".stabn", 0, ISTABNONE), 39 PSEUDO(".stabd", 0, ISTABDOT), 40 PSEUDO(".ascii", 0, IASCII), 41 PSEUDO(".asciz", 0, IASCIZ), 42 PSEUDO(".file", 0, IFILE), 43 PSEUDO(".line", 0, ILINENO), 44 PSEUDO(".ABORT", 0, IABORT), 45 46 PSEUDO("r0", 0, REG), 47 PSEUDO("r1", 1, REG), 48 PSEUDO("r2", 2, REG), 49 PSEUDO("r3", 3, REG), 50 PSEUDO("r4", 4, REG), 51 PSEUDO("r5", 5, REG), 52 PSEUDO("r6", 6, REG), 53 PSEUDO("r7", 7, REG), 54 PSEUDO("r8", 8, REG), 55 PSEUDO("r9", 9, REG), 56 PSEUDO("r10", 10, REG), 57 PSEUDO("r11", 11, REG), 58 PSEUDO("r12", 12, REG), 59 PSEUDO("r13", 13, REG), 60 PSEUDO("r14", 14, REG), 61 PSEUDO("r15", 15, REG), 62 PSEUDO("ap", 12, REG), 63 PSEUDO("fp", 13, REG), 64 PSEUDO("sp", 14, REG), 65 PSEUDO("pc", 15, REG), 66 67 PSEUDO("jcc", 0x1e, IJXXX), 68 PSEUDO("jcs", 0x1f, IJXXX), 69 PSEUDO("jeql", 0x13, IJXXX), 70 PSEUDO("jeqlu", 0x13, IJXXX), 71 PSEUDO("jgeq", 0x18, IJXXX), 72 PSEUDO("jgequ", 0x1e, IJXXX), 73 PSEUDO("jgtr", 0x14, IJXXX), 74 PSEUDO("jgtru", 0x1a, IJXXX), 75 PSEUDO("jleq", 0x15, IJXXX), 76 PSEUDO("jlequ", 0x1b, IJXXX), 77 PSEUDO("jlss", 0x19, IJXXX), 78 PSEUDO("jlssu", 0x1f, IJXXX), 79 PSEUDO("jneq", 0x12, IJXXX), 80 PSEUDO("jnequ", 0x12, IJXXX), 81 PSEUDO("jvc", 0x1c, IJXXX), 82 PSEUDO("jvs", 0x1d, IJXXX), 83 PSEUDO("jbr", 0x11, IJXXX), 84 PSEUDO("jbc", 0xe1, IJXXX), 85 PSEUDO("jbs", 0xe0, IJXXX), 86 PSEUDO("jbcc", 0xe5, IJXXX), 87 PSEUDO("jbsc", 0xe4, IJXXX), 88 PSEUDO("jbcs", 0xe3, IJXXX), 89 PSEUDO("jbss", 0xe2, IJXXX), 90 PSEUDO("jlbc", 0xe9, IJXXX), 91 PSEUDO("jlbs", 0xe8, IJXXX), 92 93 #include "instrs" 94 95 0 96 }; 97