Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:plunky:20110605085442

Diff

Diff from 1.7 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/pcc/pcc/arch/sparc64/order.c

Annotated File View

plunky
1.7
1 /*      $Id: order.c,v 1.7 2011/06/05 08:54:42 plunky Exp $     */
2
david
1.1
3 /*
4  * Copyright (c) 2008 David Crawshaw <david@zentus.com>
5  * 
6  * Permission to use, copy, modify, and/or distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  * 
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18
19 #include "pass2.h"
20
ragge
1.6
21 /* is it legal to make an OREG or NAME entry which has an
22  * offset of off, (from a register of r), if the
23  * resulting thing had type t */
david
1.1
24 int
25 notoff(TWORD tint rCONSZ offchar *cp)
26 {
ragge
1.6
27         return !SIMM13(off);
david
1.1
28 }
29
david
1.2
30 /*
31  * Turn a UMUL-referenced node into OREG.
32  */
david
1.1
33 void
34 offstar(NODE *pint shape)
35 {
david
1.2
36         if (x2debug)
37                 printf("offstar(%p)\n"p);
38
39         if (p->n_op == PLUS || p->n_op == MINUS) {
ragge
1.6
40                 if (p->n_right->n_op == ICON && SIMM13(p->n_right->n_lval)) {
david
1.2
41                         if (isreg(p->n_left) == 0)
42                                 (void)geninsn(p->n_leftINAREG);
43                         /* Converted in ormake() */
44                         return;
45                 }
46         }
47         (void)geninsn(pINAREG);
david
1.1
48 }
49
50 void
51 myormake(NODE *q)
52 {
53 }
54
55 int
ragge
1.5
56 shumul(NODE *pint shape)
david
1.1
57 {
ragge
1.5
58         if (shape & SOREG)
59                 return SROREG;
60         return SRNOPE;
david
1.1
61 }
62
63 int
64 setbin(NODE *p)
65 {
66         return 0;
67 }
68
69 int
70 setasg(NODE *pint cookie)
71 {
72         return 0;
73 }
74
75 int
76 setuni(NODE *pint cookie)
77 {
78         return 0;
79 }
80
81 struct rspecial *
82 nspecial(struct optab *q)
83 {
david
1.4
84         switch (q->op) {
85         case STASG: {
86                 static struct rspecial s[] = {
87                         { NEVERO0 },
88                         { NRIGHTO1 },
89                         { NEVERO2 },
90                         { 0 }
91                 };
92                 return s;
93         }
94         }
95
96         comperr("unknown nspecial %d: %s"q - tableq->cstring);
david
1.1
97         return 0/* XXX */
98 }
99
100 int
101 setorder(NODE *p)
102 {
103         return 0;
104 }
105
106 int *
107 livecall(NODE *p)
108 {
david
1.3
109         static int ret[] = { O0O1O2O3O4O5O6O7, -1 };
110         return ret;
david
1.1
111 }
112
113 int
114 acceptable(struct optab *op)
115 {
116         return 1;
117 }
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-11-01 00:40 +0100