<commit_before>/* $Header$ */
/*
 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
 * See the copyright notice in the ACK home directory, in the file "Copyright".
 */
/* @(#)mach4.c	1.11 */
/*
 *  Motorola 68000/68010 syntax rules
 */

operation
	:	bcdx DREG ',' DREG
			{	emit2($1 | $2 | $4<<9);}
	|	bcdx '-' '(' AREG ')' ',' '-' '(' AREG ')'
			{	emit2($1 | $4 | $9<<9 | 010);}
	|	ADD sizedef ea_ea
			{	add($1, $2);}
	|	AND sizenon ea_ea
			{	and($1, $2);}
	|	SHIFT sizedef ea_ea
			{	shift_op($1, $2);}
	|	BR expr
			{	branch($1, $2);}
	|	DBR DREG ',' expr
			{	$4.val -= (DOTVAL+2);
				Xfit(fitw($4.val));
				emit2($1 | $2);
#ifdef RELOCATION
				newrelo($4.typ, RELPC|RELO2|RELBR|RELWR);
#endif
				emit2(loww($4.val));
			}
	|	BITOP ea_ea
			{	bitop($1);}
	|	OP_EA_D ea ',' DREG
			{	emit2($1 | mrg_2 | $4<<9);
				ea_2(SIZE_W, DTA);
			}
	|	LEA ea ',' AREG
			{	emit2(040700 | mrg_2 | $4<<9);
				ea_2(SIZE_L, CTR);
			}
	|	op_ea ea
			{	emit2(($1&0177700) | mrg_2);
				ea_2($1&0300, $1&017);
			}
	|	OP_NOOP
			{	emit2($1);}
	|	CMP sizedef ea_ea
			{	cmp($2);}
	|	MOVE sizenon ea_ea
			{	move($2);}
	|	MOVEP sizedef ea_ea
			{	movep($2);}
	|	MOVEM sizedef regs ',' notimmreg
			{	movem(0, $2, $3);}
	|	MOVEM sizedef notimmreg ',' regs
			{	movem(1, $2, $5);}
	| 	MOVES sizedef ea_ea
			{	test68010();
				if (mrg_1 <= 017) {
					emit2(007000 | $2 | mrg_2);
					emit2(mrg_1 << 12 | 04000);
					ea_2($2,ALT|MEM);
				} else if (mrg_2 <= 017) {<commit_msg>added optional .w to OP_EA_D<commit_after>/* $Header$ */
/*
 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
 * See the copyright notice in the ACK home directory, in the file "Copyright".
 */
/* @(#)mach4.c	1.11 */
/*
 *  Motorola 68000/68010 syntax rules
 */

operation
	:	bcdx DREG ',' DREG
			{	emit2($1 | $2 | $4<<9);}
	|	bcdx '-' '(' AREG ')' ',' '-' '(' AREG ')'
			{	emit2($1 | $4 | $9<<9 | 010);}
	|	ADD sizedef ea_ea
			{	add($1, $2);}
	|	AND sizenon ea_ea
			{	and($1, $2);}
	|	SHIFT sizedef ea_ea
			{	shift_op($1, $2);}
	|	BR expr
			{	branch($1, $2);}
	|	DBR DREG ',' expr
			{	$4.val -= (DOTVAL+2);
				Xfit(fitw($4.val));
				emit2($1 | $2);
#ifdef RELOCATION
				newrelo($4.typ, RELPC|RELO2|RELBR|RELWR);
#endif
				emit2(loww($4.val));
			}
	|	BITOP ea_ea
			{	bitop($1);}
	|	OP_EA_D sizedef ea ',' DREG
			{	if ($2 != SIZE_W) {
					serror("illegal size");
				}
				emit2($1 | mrg_2 | $5<<9);
				ea_2(SIZE_W, DTA);
			}
	|	LEA ea ',' AREG
			{	emit2(040700 | mrg_2 | $4<<9);
				ea_2(SIZE_L, CTR);
			}
	|	op_ea ea
			{	emit2(($1&0177700) | mrg_2);
				ea_2($1&0300, $1&017);
			}
	|	OP_NOOP
			{	emit2($1);}
	|	CMP sizedef ea_ea
			{	cmp($2);}
	|	MOVE sizenon ea_ea
			{	move($2);}
	|	MOVEP sizedef ea_ea
			{	movep($2);}
	|	MOVEM sizedef regs ',' notimmreg
			{	movem(0, $2, $3);}
	|	MOVEM sizedef notimmreg ',' regs
			{	movem(1, $2, $5);}
	| 	MOVES sizedef ea_ea
			{	test68010();
				if (mrg_1 <= 017) {
					emit2(007000 | $2 | mrg_2);
					emit2(mrg_1 << 12 | 04000);
					ea_2($2,ALT|MEM);
				} else if (mrg_2 <= 017) {
{'fraction_non_alphanumeric': 0.21451822916666666, 'fraction_numerical': 0.08561197916666667, 'mean_word_length': 2.756723716381418, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6573571', 'n_tokens_mistral': 1831, 'n_tokens_neox': 1548, 'n_words': 308}