1 " BEGIN fort_equs.incl.alm
  2 "
  3 " Written: June 1976, R. A. Barnes
  4 "
  5 " Modified:
  6 "         22 June 84, MM - Install typeless functions support.
  7 "         28 Mar 84, HH - Install HFP support.
  8 "          8 November 1982,  TO - pl1_operators_ special addition 'VLA_words_per_seg'.
  9 "         21 September 1982, TO - pl1_operators_ addition 'fort_storage'.
 10 "          1 September 1982, TO - pl1_operators_ additions 'fort_return_mac',
 11 "                   'fort_cleanup'.
 12 "         12 May 1982, HH - Add mpy_overflow_check.
 13 "          5 May 1982, TO - Add shorten_stack.
 14 "         24 October 1980, CRD - add symbols for new operators needed by
 15 "                   Fortran 77 intrinsics.
 16 "         24 September 1980, CRD - change order of base registers in making pr1
 17 "                   part of the register pool.
 18 "         4 March 1980, CRD - add equal_lengths (for emit_eis macro).
 19 "         23 February 1980 RAB - add almost_ones and for_divide
 20 "         14 December 1979, CRD - add ext_entry_desc operator offset.
 21 "         30 November 1979, RAB - add j_le_s, j_g_s indicator substates for
 22 "                   register optimizer.  Also, change xq substate to ia, and
 23 "                   add some comments.
 24 "         9 August 1979, CRD - add new operator fort_dmod.
 25 "         23 July 1979, CRD - add if_bit for def_simple_cond, etc. macros
 26 "         9 July 1979 CRD - add new operator fortran_end.
 27 "         4 April 1976 DSL - add new bifs tan, dtan, asin, dasin, acos, dacos.
 28 "
 29           equ       opf,16384           operand factor
 30           equ       arg1,1*opf
 31           equ       arg2,2*opf
 32           equ       arg3,3*opf
 33           equ       arg4,4*opf
 34           equ       arg5,5*opf
 35           equ       arg6,6*opf
 36           equ       arg7,7*opf
 37 "
 38           equ       opv,0*opf
 39 "
 40           equ       op1,-1*opf
 41           equ       op2,-2*opf
 42           equ       op3,-3*opf
 43           equ       op4,-4*opf
 44           equ       op5,-5*opf
 45           equ       op6,-6*opf
 46           equ       op7,-7*opf
 47 "
 48           equ       inhibit,128         this bit necessary for all macros
 49 "
 50           equ       if_bit,256          used to differentiate if/unless
 51 "
 52           bool      int,400000
 53           bool      real,200000
 54           bool      dp,100000
 55           bool      cmpx,40000
 56           bool      logical,20000
 57           bool      char,10000
 58           bool      typeless,4000
 59           bool      label,2000
 60 "
 61           equ       intn,1*256
 62           equ       realn,2*256
 63           equ       dpn,3*256
 64           equ       cmpxn,4*256
 65           equ       logicaln,5*256
 66           equ       charn,6*256
 67           equ       typelessn,7*256
 68           equ       labeln,8*256
 69 "
 70           equ       var,-1
 71 "
 72           equ       empty,0*256
 73           equ       q,1*256
 74           equ       a,2*256
 75           equ       aq,3*256
 76           equ       eaq,4*256
 77           equ       deaq,5*256
 78           equ       ieaq,6*256
 79           equ       iq,7*256
 80           equ       ia,8*256
 81           equ       tq,9*256
 82           equ       ind,10*256
 83           equ       tze,11*256
 84           equ       tnz,12*256
 85           equ       tmi,13*256
 86           equ       tpl,14*256
 87           equ       tmoz,15*256
 88           equ       tpnz,16*256
 89           equ       tnc,17*256
 90           equ       trc,18*256
 91           equ       j_le_s,19*256
 92           equ       j_g_s,20*256
 93 "
 94           bool      variable,400000
 95           bool      constant,200000
 96           bool      array_ref,100000
 97           bool      temp,40000
 98           bool      count,20000
 99           bool      rel_constant,10000
100           bool      bif,4000
101           bool      statement_function,2000
102           bool      external,1000
103           bool      entry,400
104           bool      dummy,200
105           bool      error,100
106           bool      substr_ref,40
107 "
108           bool      x0,400000
109           bool      x1,200000
110           bool      x2,100000
111           bool      x3,40000
112           bool      x4,20000
113           bool      x5,10000
114           bool      x6,4000
115           bool      x7,2000
116           bool      pr4,1000
117           bool      pr1,400
118           bool      pr2,200
119           bool      pr3,100
120           bool      pr5,40
121           bool      pr7,20
122           bool      indices,x0+x1+x2+x3+x4+x5+x6+x7
123           bool      bases,pr1+pr4+pr2+pr3+pr5+pr7
124           bool      all,indices+bases
125 "
126           equ       pr4n,1
127           equ       pr1n,2
128           equ       pr2n,3
129           equ       pr3n,4
130           equ       pr5n,5
131           equ       pr7n,6
132 
133           equ       equal_lengths,1
134           equ       protect_indicators,1
135           equ       discard,2
136           bool      inst_word,040000
137 "
138           equ       for_divide,256
139 "
140 "         builtin operands
141 "
142           equ       zero,0              "integer constant zero
143           equ       one,1               "integer constant one
144           equ       ps,2                "symbol for Fortran I/O arglist
145           equ       auto_template,3     "init template for automatic storage
146           equ       auto_overlay,4      "overlay of automatic storage
147           equ       null_ptr,5          "constant null ITS pointer
148           equ       null,6              "null operand
149           equ       two,7               "integer constant two
150           equ       entry_info,8        "place to store quick proc info
151           equ       star_symbol,9       "<*symbol>|0
152           equ       ps_area_ptr,10      "symbol for ps.buffer_p
153           equ       desc_overlay,11     "symbol for accessing a descriptor
154 "
155           equ                 ps_ptr,42
156           equ                 format_slot,6
157           equ                 end_label_slot,12
158           equ                 error_label_slot,10
159           equ                 margin_slot,28
160           equ                 record_number_slot,9
161           equ                 string_slot,16
162           equ                 string_length_slot,21
163           equ                 file_name_slot,30
164           equ                 file_type_slot,32
165           equ                 namelist_slot,18
166           equ                 iostat_slot,46
167           equ                 buffer_size_slot,27
168 
169           equ                 descriptor_ptr,34
170           equ                 double_temp,46
171 
172           equ                 temp_pt,40
173           equ                 complex,56
174 
175           equ                 op_base,361         =o733-o162=o551     000
176 
177           equ                 all_ones,op_base-289                    072
178           equ                 blanks,op_base-73                       288
179 
180           equ                 ext_entry,op_base+188                   549
181           equ                 ext_entry_desc,op_base+189              550
182           equ                 return_op,op_base+48
183           equ                 fortran_end,op_base+446
184           equ                 fort_dmod,op_base+447
185           equ                 signal_stringrange,op_base+404
186           equ                 integer_to_real,op_base-52              309
187           equ                 integer_to_double,op_base-52            309
188           equ                 real_to_integer,op_base+67              428
189           equ                 double_to_integer,op_base+67            428
190           equ                 complex_multiply,op_base+146            507
191           equ                 complex_divide,op_base+148              509
192           equ                 r_g_s,op_base-42                        319
193           equ                 r_le_s,op_base-15                       346
194           equ                 int_p_int,op_base+384                   745
195           equ                 real_p_int,op_base+383                  744
196           equ                 real_p_real,op_base+382                 743
197           equ                 dbl_p_int,op_base+381                   742
198           equ                 dbl_p_real,op_base+379                  740
199           equ                 dbl_p_dbl,op_base+380                   741
200           equ                 cmpx_p_cmpx,op_base+421                 782
201           equ                 ftn_read,op_base+317                    678
202           equ                 ftn_write,op_base+318                   679
203           equ                 ftn_scalar_xmit,op_base+320             681
204           equ                 ftn_array_xmit,op_base+321              682
205           equ                 ftn_manip,op_base+319                   680
206           equ                 ftn_terminate,op_base+322               683
207           equ                 cabs_,op_base+413                       774
208           equ                 log_,op_base+353                        714
209           equ                 dlog_,op_base+370                       731
210           equ                 clog_,op_base+416                       777
211           equ                 alog10_,op_base+354                     715
212           equ                 dlog10_,op_base+371                     732
213           equ                 atan_,op_base+350                       711
214           equ                 datan_,op_base+367                      728
215           equ                 atan2_,op_base+373                      734
216           equ                 datan2_,op_base+375                     736
217           equ                 cos_,op_base+342                        703
218           equ                 dcos_,op_base+359                       720
219           equ                 ccos_,op_base+414                       775
220           equ                 exp_,op_base+355                        716
221           equ                 dexp_,op_base+372                       733
222           equ                 cexp_,op_base+415                       776
223           equ                 fort_modfl,op_base+142                  503
224           equ                 dmod_,op_base+420                       781
225           equ                 sign_fx,op_base+77                      438
226           equ                 sign_fl,op_base+78                      439
227           equ                 sin_,op_base+340                        701
228           equ                 dsin_,op_base+357                       718
229           equ                 csin_,op_base+417                       778
230           equ                 sqrt_,op_base+339                       700
231           equ                 dsqrt_,op_base+356                      717
232           equ                 csqrt_,op_base+418                      780
233           equ                 tanh_,op_base+419                       781
234           equ                 tan_,op_base+344                        705
235           equ                 dtan_,op_base+361                       722
236           equ                 asin_,op_base+346                       707
237           equ                 dasin_,op_base+363                      724
238           equ                 acos_,op_base+348                       709
239           equ                 dacos_,op_base+365                      726
240           equ                 trunc_fl,op_base+235                    596
241           equ                 get_math_entry,op_base+422              783
242           equ                 fortran_pause,op_base+423               784
243           equ                 fortran_stop,op_base+424                785
244           equ                 fortran_chain,op_base+425               786
245           equ                 call_ext_out,op_base+42
246           equ                 call_ext_out_desc,op_base+41
247           equ                 call_var,op_base+38
248           equ                 call_var_desc,op_base+37
249           equ                 ftn_open_element,op_base+438            799
250           equ                 ftn_get_area_ptr,op_base+439            800
251           equ                 set_cs_eis,op_base+302                  663
252           equ                 index_cs_eis,op_base+304                665
253           equ                 save_stack_quick,op_base+452            813
254           equ                 restore_stack_quick,op_base+453         814
255           equ                 shorten_stack,op_base+163               524
256           equ                 dtanh_,op_base+454                      815
257           equ                 sinh_,op_base+455                       816
258           equ                 dsinh_,op_base+456                      817
259           equ                 cosh_,op_base+457                       818
260           equ                 dcosh_,op_base+458                      819
261           equ                 nearest_whole_number,op_base+459        820
262           equ                 nearest_integer,op_base+460             821
263           equ                 ftn_inquire_element,op_base+461         822
264           equ                 mpy_overflow_check,op_base+462          823
265           equ                 fort_return_mac,op_base+463             824
266           equ                 fort_cleanup,op_base+464                825
267           equ                 fort_storage,op_base+465                826
268           equ                 enter_BFP_mode,op_base+466              827
269           equ                 enter_HFP_mode,op_base+467              828
270 
271           bool      r_l_a,474
272           bool      r_g_a,503
273           bool      r_e_as,512
274           bool      r_ne_as,515
275           bool      r_le_a,520
276           bool      r_ge_a,527
277           bool      r_l_s,507
278           bool      r_ge_s,524
279           equ       bound_ck_signal,op_base+76
280           bool      almost_one,242
281           equ       VLA_words_per_seg,op_base-476
282 "
283 "         Symbols for upper 18 bits of some common hfp values whose lower
284 "         18 bits are zeroes (i.e. values suitable for 'du' modification).
285 "
286           bool      P0.5H,000400        = +0.5h,du
287           bool      P1.0H,002040        = +1.0h,du
288           bool      P2.0H,002100        = +2.0h,du
289 "
290 " END   fort_equs.incl.alm