mach2.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. #define RCSID2 "$Id$"
  6. /*
  7. ** Zilog z8000 machine dependent yacc declarations
  8. */
  9. /* Some of the following mnemonics might seem a little cryptic,
  10. ** especially those like F1_1a. The decision to choose these mnemo-
  11. ** nics is based on the fact that the manual `Z8000 PLZ/ASM Assembly
  12. ** Language Programming Manual' distinguishes some instruction for-
  13. ** mats and gave them names like F1.1, etc. In fact section 3.3 of
  14. ** this manual describes the instruction set and mentions with each
  15. ** instruction also the corresponding instruction format(s). So I
  16. ** sorted all instructions on their instruction format(s) resulting
  17. ** in groups named F1_1, F1_2, F2_1, etc. (Groups consisting of one
  18. ** member where named to that member). Almost all groups were so
  19. ** consistent that writing one yacc-rule per group sufficed. Only
  20. ** some groups had to be split up resulting in mnemonics like F1_1a
  21. ** and F1_1b.
  22. */
  23. %token <y_word> CALR CC CTLR CTLRFLAGS DJNZ FLAG F1_1a F1_1b
  24. %token <y_word> F1_1F2_3 F1_2 F1_2F6_3 F2_1 F2_1F5_1 F5_1L F5_1R
  25. %token <y_word> F6_4 F6_5 F6_6 F9_1 F9_2 F9_3 IN INTCB JP JR
  26. %token <y_word> LD LDA LDAR LDCTL LDCTLB LDK LDL LDM LDR MREQ
  27. %token <y_word> OUT POP PUSH R8 R16 R32 R64 RET SC TCC
  28. /* From all addressing modes only 'im' and 'ra' might need more than
  29. ** 16 bits; This is achieved by using the global var 'immed' in
  30. ** case of 'im' and by returning a long in case of 'ra'.
  31. */
  32. %type <y_word> ba bx coco1 coco2 ctlargs ctlbargs da dst flags
  33. %type <y_word> im imexpr ints ir opr option option2 reg src x
  34. %type <y_expr> ra