1 /* $Id: mach4.c, v1.9 15-Mar-89 AJM */
3 operation : BRANCH optlink expr
4 {branch($1, $2, $3.val);}
5 | DATA1 optcond opts optp REG ',' REG ',' operand
6 {data($1,$2|$3|$4|$5<<12|$7<<16,$9.val,$9.typ);}
7 | DATA2 optcond opts optp REG ',' operand
8 {data($1,$2|$3|$4|$5<<12,$7.val,$7.typ);}
9 | DATA3 optcond opts optp REG ',' operand
10 {data($1,$2|$3|$4|$5<<16,$7.val,$7.typ);}
11 | SDT optcond optb optt REG ',' address
12 {strldr($1,$2|$3|$4|$5<<12,$7);}
13 | BDT optcond REG optexc ',' reglist optpsr
14 {emit4($1|$2|$3<<16|$4|$6|$7);}
16 {emit4($1|$2|$3.val);}
17 | ADR optcond REG ',' expr
18 {calcadr($2,$3,$5.val,$5.typ);}
19 | MUL optcond REG ',' REG ',' REG
20 {emit4($1|$2|$3<<16|$5|$7<<8);}
21 | MLA optcond REG ',' REG ',' REG ',' REG
22 {emit4($1|$2|$3<<16|$5|$7<<8|$9<<12);}
30 optcond : {$$=0xE0000000;}
65 operand : REG optshift
66 {$$.val = $1|$2; $$.typ = S_REG;}
71 optshift : ',' SHIFT shftcnt
79 aoptshift : ',' SHIFT '#' expr
80 {$$ = $2|calcshft($4.val, $4.typ, $<y_word>0);}
88 {$$ = calcshft($2.val, $2.typ, $<y_word>0);}
94 {success = 0; $$ = $1.val;}
96 {success = 1; $$ = 0x01000000|$2<<16;}
97 | '[' REG ',' offset ']' optexc
98 {success = 1; $$ = $2<<16|$4|$6|0x01000000;}
99 | '[' REG ']' ',' offset
100 {success = 1; $$ = $2<<16|$5;}
104 {$$ = calcoffset($2.val);}
105 | optsign REG aoptshift
106 {$$ = 0x02000000|$1|$2|$3;}
109 optsign : {$$ = 0x00800000;}
116 reglist : '{' rlist '}'
126 for ($$ = 0; $1 <= $3; $1++)