Pristine Ack-5.5
[Ack-5.5.git] / util / ncgg / instruct.h
1 /*
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".
4  */
5 /* $Id: instruct.h,v 0.3 1994/06/24 10:37:29 ceriel Exp $ */
6
7 #ifndef _COST_
8 #include "cost.h"
9 #endif
10
11 #define AD_RO 01        /* Read only operand */
12 #define AD_WO 02        /* Write only operand */        
13 #define AD_RW 03        /* Read-write operand */
14 #define AD_RWMASK 03    /* Mask to select these possiblities */
15
16 #define AD_CC 04        /* Condition codes set to this one */
17
18 typedef struct operand {
19         struct operand *o_next;
20         short           o_setno;
21         short           o_adorn;
22 } operand;
23
24 typedef struct instruction {
25         char            *i_name;
26         short            i_asname;
27         short            i_nops;
28         operand         *i_oplist;
29         struct varinfo  *i_erases;
30         cost_t           i_cost;
31 } instr_t,*instr_p;
32
33 extern instr_t l_instr[];
34
35 /*
36  * The read only information on the operands is not used at the moment.
37  * Predicted future use:
38  * When using :ro data it is possible to use a register in its stead
39  * if it contains the same information and is allowed as an operand
40  * in this place. Too difficult for now.
41  */