mkstrct.c 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. #ifndef NORCSID
  2. static char rcsid3[] = "$Id$";
  3. #endif
  4. #include "nopt.h"
  5. void
  6. EM_mkop(p,opcode)
  7. register p_instr p;
  8. int opcode;
  9. {
  10. p->em_type = EM_MNEM;
  11. p->em_opcode = opcode;
  12. p->em_argtype = 0;
  13. }
  14. void
  15. EM_mknarg(p,opcode)
  16. register p_instr p;
  17. int opcode;
  18. {
  19. p->em_type = EM_MNEM;
  20. p->em_opcode = opcode;
  21. p->em_argtype = 0;
  22. p->em_cst = 0;
  23. }
  24. void
  25. EM_mkilb(p,opcode,lab)
  26. register p_instr p;
  27. int opcode;
  28. label lab;
  29. {
  30. p->em_type = EM_MNEM;
  31. p->em_argtype = ilb_ptyp;
  32. p->em_opcode = opcode;
  33. p->em_ilb = lab;
  34. }
  35. void
  36. EM_mknof(p,opcode,lab,off)
  37. register p_instr p;
  38. int opcode;
  39. label lab;
  40. arith off;
  41. {
  42. p->em_type = EM_MNEM;
  43. p->em_argtype = nof_ptyp;
  44. p->em_opcode = opcode;
  45. p->em_dlb = lab;
  46. p->em_off = off;
  47. }
  48. void
  49. EM_mksof(p,opcode,name,off)
  50. register p_instr p;
  51. int opcode;
  52. char *name;
  53. arith off;
  54. {
  55. p->em_type = EM_MNEM;
  56. p->em_argtype = sof_ptyp;
  57. p->em_opcode = opcode;
  58. p->em_dnam = OO_freestr(name);
  59. p->em_off = off;
  60. }
  61. void
  62. EM_mkcst(p,opcode,cst)
  63. register p_instr p;
  64. int opcode;
  65. arith cst;
  66. {
  67. p->em_type = EM_MNEM;
  68. p->em_argtype = cst_ptyp;
  69. p->em_opcode = opcode;
  70. p->em_cst = cst;
  71. }
  72. void
  73. EM_mkpro(p,opcode,pnam)
  74. register p_instr p;
  75. int opcode;
  76. char *pnam;
  77. {
  78. p->em_type = EM_MNEM;
  79. p->em_argtype = pro_ptyp;
  80. p->em_opcode = opcode;
  81. p->em_pnam = OO_freestr(pnam);
  82. }
  83. void
  84. EM_mkdefilb(p,opcode,deflb)
  85. register p_instr p;
  86. int opcode;
  87. label deflb;
  88. {
  89. p->em_type = EM_DEFILB;
  90. p->em_opcode = opcode;
  91. p->em_argtype = 0;
  92. p->em_ilb = deflb;
  93. }
  94. void
  95. EM_Nop(opcode)
  96. int opcode;
  97. {
  98. register p_instr p = GETNXTPATT();
  99. p->em_type = EM_MNEM;
  100. p->em_opcode = opcode;
  101. p->em_argtype = 0;
  102. }
  103. void
  104. EM_Nnarg(opcode)
  105. int opcode;
  106. {
  107. register p_instr p = GETNXTPATT();
  108. p->em_type = EM_MNEM;
  109. p->em_opcode = opcode;
  110. p->em_argtype = 0;
  111. p->em_cst = 0;
  112. }
  113. void
  114. EM_Nilb(opcode,lab)
  115. int opcode;
  116. label lab;
  117. {
  118. register p_instr p = GETNXTPATT();
  119. p->em_type = EM_MNEM;
  120. p->em_argtype = ilb_ptyp;
  121. p->em_opcode = opcode;
  122. p->em_ilb = lab;
  123. }
  124. void
  125. EM_Nnof(opcode,lab,off)
  126. int opcode;
  127. label lab;
  128. arith off;
  129. {
  130. register p_instr p = GETNXTPATT();
  131. p->em_type = EM_MNEM;
  132. p->em_argtype = nof_ptyp;
  133. p->em_opcode = opcode;
  134. p->em_dlb = lab;
  135. p->em_off = off;
  136. }
  137. void
  138. EM_Nsof(opcode,name,off)
  139. int opcode;
  140. char *name;
  141. arith off;
  142. {
  143. register p_instr p = GETNXTPATT();
  144. p->em_type = EM_MNEM;
  145. p->em_argtype = sof_ptyp;
  146. p->em_opcode = opcode;
  147. p->em_dnam = OO_freestr(name);
  148. p->em_off = off;
  149. }
  150. void
  151. EM_Ncst(opcode,cst)
  152. int opcode;
  153. arith cst;
  154. {
  155. register p_instr p = GETNXTPATT();
  156. p->em_type = EM_MNEM;
  157. p->em_argtype = cst_ptyp;
  158. p->em_opcode = opcode;
  159. p->em_cst = cst;
  160. }
  161. void
  162. EM_Npro(opcode,pnam)
  163. int opcode;
  164. char *pnam;
  165. {
  166. register p_instr p = GETNXTPATT();
  167. p->em_type = EM_MNEM;
  168. p->em_argtype = pro_ptyp;
  169. p->em_opcode = opcode;
  170. p->em_pnam = OO_freestr(pnam);
  171. }
  172. void
  173. EM_Ndefilb(opcode,deflb)
  174. int opcode;
  175. label deflb;
  176. {
  177. register p_instr p = GETNXTPATT();
  178. p->em_type = EM_DEFILB;
  179. p->em_opcode = opcode;
  180. p->em_argtype = 0;
  181. p->em_ilb = deflb;
  182. }
  183. void
  184. EM_Rop(opcode)
  185. int opcode;
  186. {
  187. register p_instr p = GETNXTREPL();
  188. p->em_type = EM_MNEM;
  189. p->em_opcode = opcode;
  190. p->em_argtype = 0;
  191. }
  192. void
  193. EM_Rnarg(opcode)
  194. int opcode;
  195. {
  196. register p_instr p = GETNXTREPL();
  197. p->em_type = EM_MNEM;
  198. p->em_opcode = opcode;
  199. p->em_argtype = 0;
  200. p->em_cst = 0;
  201. }
  202. void
  203. EM_Rilb(opcode,lab)
  204. int opcode;
  205. label lab;
  206. {
  207. register p_instr p = GETNXTREPL();
  208. p->em_type = EM_MNEM;
  209. p->em_argtype = ilb_ptyp;
  210. p->em_opcode = opcode;
  211. p->em_ilb = lab;
  212. }
  213. void
  214. EM_Rnof(opcode,lab,off)
  215. int opcode;
  216. label lab;
  217. arith off;
  218. {
  219. register p_instr p = GETNXTREPL();
  220. p->em_type = EM_MNEM;
  221. p->em_argtype = nof_ptyp;
  222. p->em_opcode = opcode;
  223. p->em_dlb = lab;
  224. p->em_off = off;
  225. }
  226. void
  227. EM_Rsof(opcode,name,off)
  228. int opcode;
  229. char *name;
  230. arith off;
  231. {
  232. register p_instr p = GETNXTREPL();
  233. p->em_type = EM_MNEM;
  234. p->em_argtype = sof_ptyp;
  235. p->em_opcode = opcode;
  236. p->em_dnam = OO_freestr(name);
  237. p->em_off = off;
  238. }
  239. void
  240. EM_Rcst(opcode,cst)
  241. int opcode;
  242. arith cst;
  243. {
  244. register p_instr p = GETNXTREPL();
  245. p->em_type = EM_MNEM;
  246. p->em_argtype = cst_ptyp;
  247. p->em_opcode = opcode;
  248. p->em_cst = cst;
  249. }
  250. void
  251. EM_Rpro(opcode,pnam)
  252. int opcode;
  253. char *pnam;
  254. {
  255. register p_instr p = GETNXTREPL();
  256. p->em_type = EM_MNEM;
  257. p->em_argtype = pro_ptyp;
  258. p->em_opcode = opcode;
  259. p->em_pnam = OO_freestr(pnam);
  260. }
  261. void
  262. EM_Rdefilb(opcode,deflb)
  263. int opcode;
  264. label deflb;
  265. {
  266. register p_instr p = GETNXTREPL();
  267. p->em_type = EM_DEFILB;
  268. p->em_opcode = opcode;
  269. p->em_argtype = 0;
  270. p->em_ilb = deflb;
  271. }