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