Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/tendra5-amd64/src/installers/sparc/common/regable.c – Rev 5

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
 
32
 
33
/*
34
			    VERSION INFORMATION
35
			    ===================
36
 
37
--------------------------------------------------------------------------
38
$Header: /u/g/release/CVSROOT/Source/src/installers/sparc/common/regable.c,v 1.1.1.1 1998/01/17 15:55:55 release Exp $
39
--------------------------------------------------------------------------
40
$Log: regable.c,v $
41
 * Revision 1.1.1.1  1998/01/17  15:55:55  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.6  1996/09/06  16:50:35  pwe
45
 * fix outpar doubles for postlude
46
 *
47
 * Revision 1.5  1995/12/15  10:26:39  john
48
 * Made caller_names non-regable
49
 *
50
 * Revision 1.4  1995/09/25  16:35:45  john
51
 * Fix for outpar
52
 *
53
 * Revision 1.3  1995/05/26  13:01:16  john
54
 * Reformatting
55
 *
56
 * Revision 1.2  1995/03/28  12:24:40  john
57
 * Stopped putting arrays in registers
58
 *
59
 * Revision 1.1.1.1  1995/03/13  10:18:53  john
60
 * Entered into CVS
61
 *
62
 * Revision 1.3  1994/12/01  13:36:27  djch
63
 * Fix fixregable and floatregable to avoid envoffset's
64
 *
65
 * Revision 1.2  1994/07/07  16:11:33  djch
66
 * Jul94 tape
67
 *
68
 * Revision 1.1  1994/05/03  14:49:50  djch
69
 * Initial revision
70
 *
71
 * Revision 1.2  93/09/27  14:54:38  14:54:38  ra (Robert Andrews)
72
 * Long double values should not be put in registers (yet),
73
 * 
74
 * Revision 1.1  93/06/24  14:59:08  14:59:08  ra (Robert Andrews)
75
 * Initial revision
76
 * 
77
--------------------------------------------------------------------------
78
*/
79
 
80
 
81
#define SPARCTRANS_CODE
82
#include "config.h"
83
#include "expmacs.h"
84
#include "common_types.h"
85
#include "shapemacs.h"
86
#include "tags.h"
87
#include "regable.h"
88
 
89
/*
90
  DOES A VALUE OF SHAPE s FIT INTO A FIXED REGISTER?
91
*/
92
 
93
bool valregable 
94
    PROTO_N ( ( s ) )
95
    PROTO_T ( shape s ){
96
  if ( is_floating ( name ( s ) ) ) {
97
    /* Floating point values don't go in fixed registers */
98
    return ( 0 ) ;
99
  } 
100
  else {
101
    ash a ;
102
    a = ashof ( s ) ;
103
    if ( a.ashsize > 32 ) {
104
      /* Reject anything too big */
105
      return ( 0 ) ;
106
    } 
107
    else if ( name ( s ) == cpdhd || name (s) == nofhd) {
108
      /* Compound shapes are not put in registers */
109
      return ( 0 ) ;
110
    } 
111
    else if ( /*a.ashsize == a.ashalign && a.ashalign !=*/ 1 ) {
112
      /* Bitfields are put in registers */
113
      return ( 1 ) ;
114
    }
115
  }
116
  return ( 0 ) ;
117
}
118
 
119
 
120
/*
121
  DOES THE EXPRESSION e FIT INTO A FIXED REGISTER?
122
*/
123
 
124
bool fixregable 
125
    PROTO_N ( ( e ) )
126
    PROTO_T ( exp e ){
127
  if ( !isvis ( e ) && !isoutpar ( e) && !isglob ( e ) && !isenvoff(e) &&
128
       name(son(e)) != caller_name_tag) {
129
    shape s = sh ( son ( e ) ) ;
130
    return ( valregable ( s ) ) ;
131
  }
132
  return ( 0 ) ;
133
}
134
 
135
 
136
/*
137
  DOES THE EXPRESSION e FIT INTO A FLOATING POINT REGISTER?
138
*/
139
 
140
bool floatregable 
141
    PROTO_N ( ( e ) )
142
    PROTO_T ( exp e ){
143
  if ( !isvis ( e ) && !isoutpar ( e) && !isglob ( e ) && !isenvoff(e) &&
144
       name(son(e)) != caller_name_tag) {
145
    shape s = sh ( son ( e ) ) ;
146
    if ( is_floating ( name ( s ) ) ) {
147
#if use_long_double
148
      if ( shape_size ( s ) > 64 ) return ( 0 ) ;
149
#endif
150
      return ( 1 ) ;
151
    } 
152
    else {
153
      return ( 0 ) ;
154
    }
155
  }
156
  return ( 0 ) ;
157
}
158