mach2.c 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * (c) copyright 1990 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. * VAX-11 machine dependent yacc declarations
  8. */
  9. /* operands are indicated with a letter combination:
  10. b - general operand of byte size
  11. w - general operand of word size
  12. l - general operand of long size
  13. u - general operand of > long size (immediate mode is not
  14. implemented for this size, and neither are immediate
  15. floating point encodings
  16. A - an operand of which the address is taken (so, no register
  17. or immediate mode)
  18. V - a bit-field operand (no immediate mode)
  19. Bb - byte offset branch
  20. Bw - word offset branch
  21. Bl - long offset branch
  22. Bx - branch, size of offset determined by instruction
  23. Be - extended conditional branch; the instruction may be replaced
  24. by a reverse-conditional branch over a branch or jump
  25. To reduce the number of terminals, some instructions that have operands of
  26. equal size are coded with an X instead of b, w, or l; these instructions
  27. have the size in the high order word of the valu field. This is needed
  28. because some yacc versions do not accept grammars with more than 127
  29. terminal symbols.
  30. */
  31. %token <y_word> REG
  32. %token <y_word> CASE_X_X_X
  33. %token <y_word> OP0
  34. %token <y_word> OP1_A OP1_Bx OP1_u OP1_Be
  35. %token <y_word> OP1_BX OP1_X
  36. %token <y_word> OP2_A_A OP2_A_l OP2_b_b OP2_b_l OP2_b_u OP2_b_w OP2_l_A
  37. OP2_l_Bb OP2_l_b OP2_l_l OP2_l_u OP2_l_w OP2_u_b OP2_u_l
  38. OP2_u_u OP2_u_w OP2_w_b OP2_w_l OP2_w_u OP2_w_w OP2_l_Be
  39. %token <y_word> OP3_b_b_b OP3_b_l_l OP3_b_u_u OP3_b_w_A OP3_l_V_Bb
  40. OP3_l_l_Bb OP3_l_l_l OP3_l_w_A OP3_u_u_u OP3_u_w_A
  41. OP3_w_A_A OP3_w_A_l OP3_w_w_w OP3_l_V_Be
  42. %token <y_word> OP4_A_l_w_A OP4_b_b_b_Bw OP4_l_b_V_l OP4_l_l_b_V
  43. OP4_l_l_l_Bw OP4_l_l_l_u OP4_l_u_l_l OP4_u_u_u_Bw
  44. OP4_w_A_A_A OP4_w_A_A_b OP4_w_A_w_A OP4_w_w_w_Bw
  45. %token <y_word> OP5_u_b_u_l_u OP5_u_w_u_l_u OP5_w_A_A_w_A OP5_w_A_b_w_A
  46. %token <y_word> OP6_b_w_A_b_w_A OP6_l_l_l_l_l_l OP6_w_A_b_A_w_A
  47. OP6_w_A_w_A_w_A
  48. /* operand types:
  49. O - the b, w, l, A and V operands (they all fall into the same
  50. syntactic category)
  51. B - branch offsets (these do not result in an addressing mode
  52. byte)
  53. */
  54. %type <y_word> OP1_O OP1_B
  55. %type <y_word> OP2_O_O OP2_O_B
  56. %type <y_word> OP3_O_O_O OP3_O_O_B
  57. %type <y_word> OP4_O_O_O_O OP4_O_O_O_B
  58. %type <y_word> OP5_O_O_O_O_O
  59. %type <y_word> OP6_O_O_O_O_O_O
  60. %type <y_word> CASE_O_O_O
  61. %type <y_word> oper