OpenCores
URL https://opencores.org/ocsvn/raptor64/raptor64/trunk

Subversion Repositories raptor64

[/] [raptor64/] [trunk/] [software/] [c64/] [source/] [Expr.h] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 37 robfinch
/*
2
 *      68000 C compiler
3
 *
4
 *      Copyright 1984, 1985, 1986 Matthew Brandt.
5
 *  all commercial rights reserved.
6
 *
7
 *      This compiler is intended as an instructive tool for personal use. Any
8
 *      use for profit without the written consent of the author is prohibited.
9
 *
10
 *      This compiler may be distributed freely for non-commercial use as long
11
 *      as this notice stays intact. Please forward any enhancements or questions
12
 *      to:
13
 *
14
 *              Matthew Brandt
15
 *              Box 920337
16
 *              Norcross, Ga 30092
17
 */
18
 
19
/*      expression tree descriptions    */
20
 
21
enum e_node {
22
        en_void,        /* used for parameter lists */
23
        en_cbw, en_cbc, en_cbh,
24
                en_ccw, en_cch, en_chw,
25
                en_cwl, en_cld, en_cfd,
26
        en_icon, en_fcon, en_labcon, en_nacon, en_autocon,
27
                en_c_ref, en_uc_ref, en_h_ref, en_uh_ref,
28
        en_b_ref, en_w_ref, en_ub_ref, en_uw_ref,
29
        en_fcall, en_tempref, en_regvar, en_add, en_sub, en_mul, en_mod,
30
        en_div, en_shl, en_shr, en_shru, en_cond, en_assign,
31
        en_asadd, en_assub, en_asmul, en_asdiv, en_asmod, en_asrsh, en_asmulu,
32
        en_aslsh, en_asand, en_asor, en_asxor, en_uminus, en_not, en_compl,
33
        en_eq, en_ne, en_lt, en_le, en_gt, en_ge,
34
                en_and, en_or, en_land, en_lor,
35
        en_xor, en_ainc, en_adec, en_mulu, en_udiv, en_umod, en_ugt,
36
        en_uge, en_ule, en_ult,
37
                en_ref, en_ursh,
38
                en_uwfieldref,en_wfieldref,en_bfieldref,en_ubfieldref,
39
                en_uhfieldref,en_hfieldref,en_ucfieldref,en_cfieldref
40
                };
41
 
42
struct enode {
43
    enum e_node nodetype;
44
        enum e_bt etype;
45
        long      esize;
46
    __int8 constflag;
47
        __int8 bit_width;
48
        __int8 bit_offset;
49 51 robfinch
        __int8 scale;
50 37 robfinch
        // The following could be in a value union
51
    __int64 i;
52
    double f;
53
    char  *sp;
54
    struct enode *p[2];
55
};
56
 
57
typedef struct enode ENODE;
58
 
59
typedef struct cse {
60
        struct cse      *next;
61
        struct enode    *exp;           /* optimizable expression */
62
        int             uses;           /* number of uses */
63
        int             duses;          /* number of dereferenced uses */
64
        short int       voidf;          /* cannot optimize flag */
65
        short int       reg;            /* AllocateRegisterVarsd register */
66
        } CSE;
67
 
68
 
69


powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.