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".
5 #define RCSID5 "$Id: mach5.c,v 0.3 1994/06/24 12:55:56 ceriel Exp $"
8 * Motorola 6805 special routines
12 branch(opc,exp,cell) register opc; expr_t cell; expr_t exp; {
16 dist = exp.val - (DOTVAL + 2);
17 if((opc & 0xf0) == 0) dist -= 1; /* bitbranch */
18 if (pass == PASS_2 && dist > 0 && !(exp.typ & S_DOT))
21 if ((exp.typ & ~S_DOT) != DOTTYP)
23 if (opc == 0x20 || opc == 0xAD)
27 if (small(sm,saving)) {
29 if((opc & 0xF0) == 0) /* bit branch */
32 newrelo(exp.typ, RELPC|RELO1);
36 if (opc == 0xAD) /* bsr */
37 emit1(0xBD); /* jsr */
39 if (opc != 0x20) { /* bra */
41 /* reverse condition : */
44 if((opc & 0xF0) == 0) /* bitbranch */
48 emit1(0xCC); /* jmp */
51 newrelo(exp.typ, RELPC|RELO2|RELBR);