1 /*-
2 * Copyright (c) 1986 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Computer Consoles Inc.
7 *
8 * %sccs.include.redist.c%
9 *
10 * @(#)Aaobleq.c 7.1 (Berkeley) 12/06/90
11 */
12
13 #include "align.h"
aobleq(infop)14 aobleq(infop) process_info *infop;
15 /*
16 /* Add one, branch if less or equal.
17 /* Can't use real HW opcodes since we don't want to branch here.
18 /*
19 /*******************************************/
20 {
21 register long limit, index, new_address, complement;
22
23 limit = operand(infop,0)->data;
24 index = operand(infop,1)->data;
25 complement = limit + ~index;
26 if ( complement < 0){ carry_0; negative_1;} else{negative_0; carry_1;}
27 if ( complement == 0) zero_1; else zero_0;
28 overflow_0;
29 write_back (infop, index+1, operand(infop,1));
30 new_address = operand(infop,2)->address;
31 if (!negative || zero) pc = new_address;
32 }
33