Lines Matching +full:0 +full:- +full:31

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
5 * Floating-point emulation code
6 * Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.org>
26 PA header file -- do not include this header file for non-PA builds.
41 * floating-point precisions.
44 * +-------+-------+-------+-------+-------+-------+-------+-------+
46 * +-------+-------+-------+-------+-------+-------+-------+-------+
49 #define Ssign(object) Bitfield_extract( 0, 1,object)
50 #define Ssignedsign(object) Bitfield_signed_extract( 0, 1,object)
56 #define Sexponentmantissa(object) Bitfield_mask( 1, 31,object)
57 #define Ssignexponent(object) Bitfield_extract( 0, 9,object)
62 #define Slow(object) Bitfield_mask( 31, 1,object)
64 #define Slow31(object) Bitfield_mask( 1, 31,object)
65 #define Shigh31(object) Bitfield_extract( 0, 31,object)
66 #define Ssignedhigh31(object) Bitfield_signed_extract( 0, 31,object)
67 #define Shigh4(object) Bitfield_extract( 0, 4,object)
72 #define Sbit31(object) Bitfield_mask( 31, 1,object)
74 #define Deposit_ssign(object,value) Bitfield_deposit(value,0,1,object)
79 Bitfield_deposit(value,1,31,object)
80 #define Deposit_ssignexponent(object,value) Bitfield_deposit(value,0,9,object)
81 #define Deposit_slow(object,value) Bitfield_deposit(value,31,1,object)
82 #define Deposit_shigh4(object,value) Bitfield_deposit(value,0,4,object)
84 #define Is_ssign(object) Bitfield_mask( 0, 1,object)
88 #define Is_slow(object) Bitfield_mask( 31, 1,object)
93 #define Is_sbit31(object) Bitfield_mask( 31, 1,object)
97 * +-------+-------+-------+-------+-------+-------+-------+-------+
99 * +-------+-------+-------+-------+-------+-------+-------+-------+
101 * +-------+-------+-------+-------+-------+-------+-------+-------+
103 * +-------+-------+-------+-------+-------+-------+-------+-------+
106 #define Dsign(object) Bitfield_extract( 0, 1,object)
107 #define Dsignedsign(object) Bitfield_signed_extract( 0, 1,object)
113 #define Dexponentmantissap1(object) Bitfield_mask( 1, 31,object)
114 #define Dsignexponent(object) Bitfield_extract( 0, 12,object)
119 #define Dlowp1(object) Bitfield_mask( 31, 1,object)
120 #define Dlow31p1(object) Bitfield_mask( 1, 31,object)
121 #define Dhighp1(object) Bitfield_extract( 0, 1,object)
122 #define Dhigh4p1(object) Bitfield_extract( 0, 4,object)
123 #define Dhigh31p1(object) Bitfield_extract( 0, 31,object)
124 #define Dsignedhigh31p1(object) Bitfield_signed_extract( 0, 31,object)
127 #define Deposit_dsign(object,value) Bitfield_deposit(value,0,1,object)
132 Bitfield_deposit(value,1,31,object)
133 #define Deposit_dsignexponent(object,value) Bitfield_deposit(value,0,12,object)
134 #define Deposit_dlowp1(object,value) Bitfield_deposit(value,31,1,object)
135 #define Deposit_dhigh4p1(object,value) Bitfield_deposit(value,0,4,object)
137 #define Is_dsign(object) Bitfield_mask( 0, 1,object)
141 #define Is_dlowp1(object) Bitfield_mask( 31, 1,object)
142 #define Is_dhighp1(object) Bitfield_mask( 0, 1,object)
147 #define Dlowp2(object) Bitfield_mask( 31, 1,object)
149 #define Dlow31p2(object) Bitfield_mask( 1, 31,object)
150 #define Dhighp2(object) Bitfield_extract( 0, 1,object)
151 #define Dhigh31p2(object) Bitfield_extract( 0, 31,object)
158 #define Dbit31p2(object) Bitfield_mask( 31, 1,object)
160 #define Deposit_dlowp2(object,value) Bitfield_deposit(value,31,1,object)
162 #define Is_dlowp2(object) Bitfield_mask( 31, 1,object)
163 #define Is_dhighp2(object) Bitfield_mask( 0, 1,object)
170 #define Is_dbit31p2(object) Bitfield_mask( 31, 1,object)
174 * +-------+-------+-------+-------+-------+-------+-------+-------+
176 * +-------+-------+-------+-------+-------+-------+-------+-------+
178 * +-------+-------+-------+-------+-------+-------+-------+-------+
180 * +-------+-------+-------+-------+-------+-------+-------+-------+
182 * +-------+-------+-------+-------+-------+-------+-------+-------+
184 * +-------+-------+-------+-------+-------+-------+-------+-------+
186 * +-------+-------+-------+-------+-------+-------+-------+-------+
188 * +-------+-------+-------+-------+-------+-------+-------+-------+
196 Bitfield_extract( 0, 1,u_qsign,qsign)
197 Bitfield_signed_extract( 0, 1,u_qsignedsign,qsignedsign)
203 Bitfield_extract( 1, 31,u_qexponentmantissap1,qexponentmantissap1)
204 Bitfield_extract( 0, 16,u_qsignexponent,qsignexponent)
209 Bitfield_extract(31, 1,u_qlowp1,qlowp1)
210 Bitfield_extract( 1, 31,u_qlow31p1,qlow31p1)
211 Bitfield_extract( 0, 1,u_qhighp1,qhighp1)
212 Bitfield_extract( 0, 4,u_qhigh4p1,qhigh4p1)
213 Bitfield_extract( 0, 31,u_qhigh31p1,qhigh31p1)
220 Bitfield_extract(31, 1,u_qlowp2,qlowp2)
221 Bitfield_extract( 1, 31,u_qlow31p2,qlow31p2)
222 Bitfield_extract( 0, 1,u_qhighp2,qhighp2)
223 Bitfield_extract( 0, 31,u_qhigh31p2,qhigh31p2)
230 Bitfield_extract(31, 1,u_qlowp3,qlowp3)
231 Bitfield_extract( 1, 31,u_qlow31p3,qlow31p3)
232 Bitfield_extract( 0, 1,u_qhighp3,qhighp3)
233 Bitfield_extract( 0, 31,u_qhigh31p3,qhigh31p3)
240 Bitfield_extract(31, 1,u_qlowp4,qlowp4)
241 Bitfield_extract( 1, 31,u_qlow31p4,qlow31p4)
242 Bitfield_extract( 0, 1,u_qhighp4,qhighp4)
243 Bitfield_extract( 0, 31,u_qhigh31p4,qhigh31p4)
248 /* Extension - An additional structure to hold the guard, round and
252 #define Extsign(object) Bitfield_extract( 0, 1,object)
253 #define Exthigh31(object) Bitfield_extract( 0, 31,object)
254 #define Extlow31(object) Bitfield_extract( 1, 31,object)
255 #define Extlow(object) Bitfield_extract( 31, 1,object)
258 * Single extended - The upper word is just like single precision,
263 #define Sextlowp1(object) Bitfield_extract( 31, 1,object)
264 #define Sexthighp2(object) Bitfield_extract( 0, 1,object)
265 #define Sextlow31p2(object) Bitfield_extract( 1, 31,object)
270 * Double extended - The upper two words are just like double precision,
277 #define Dextlowp2(object) Bitfield_extract( 31, 1,object)
278 #define Dexthighp3(object) Bitfield_extract( 0, 1,object)
279 #define Dextlow31p3(object) Bitfield_extract( 1, 31,object)
282 #define Deposit_dextlowp4(object,value) Bitfield_deposit(value,31,1,object)
286 * fixed-point precisions.
289 * +-------+-------+-------+-------+-------+-------+-------+-------+
291 * +-------+-------+-------+-------+-------+-------+-------+-------+
297 * +-------+-------+-------+-------+-------+-------+-------+-------+
299 * +-------+-------+-------+-------+-------+-------+-------+-------+
301 * +-------+-------+-------+-------+-------+-------+-------+-------+
303 * +-------+-------+-------+-------+-------+-------+-------+-------+
317 * +-------+-------+-------+-------+-------+-------+-------+-------+
319 * +-------+-------+-------+-------+-------+-------+-------+-------+
321 * +-------+-------+-------+-------+-------+-------+-------+-------+
323 * +-------+-------+-------+-------+-------+-------+-------+-------+
325 * +-------+-------+-------+-------+-------+-------+-------+-------+
327 * +-------+-------+-------+-------+-------+-------+-------+-------+
329 * +-------+-------+-------+-------+-------+-------+-------+-------+
331 * +-------+-------+-------+-------+-------+-------+-------+-------+
355 #define SGL_EMIN (-126)
365 #define DBL_EMIN (-1022)
375 #define QUAD_EMIN (-16382)
382 #define FALSE 0
389 #define NULL 0
390 #define NIL 0
391 #define SGL 0
405 * 0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 6 7 8 930 1
406 * +-------+-------+-------+-------+-------+-------+-------+-------+
408 * +-------+-------+-------+-------+-------+-------+-------+-------+
417 #define Inexacttrap(object) Bitfield_extract( 31, 1,object)
418 #define Invalidflag(object) Bitfield_extract( 0, 1,object)
423 #define Allflags(object) Bitfield_extract( 0, 5,object)
428 #define ROUNDNEAREST 0
434 #define NOEXCEPTION 0x0
435 #define INVALIDEXCEPTION 0x20
436 #define DIVISIONBYZEROEXCEPTION 0x10
437 #define OVERFLOWEXCEPTION 0x08
438 #define UNDERFLOWEXCEPTION 0x04
439 #define INEXACTEXCEPTION 0x02
440 #define UNIMPLEMENTEDEXCEPTION 0x01
443 #define OPC_2E_INVALIDEXCEPTION 0x30
444 #define OPC_2E_OVERFLOWEXCEPTION 0x18
445 #define OPC_2E_UNDERFLOWEXCEPTION 0x0c
446 #define OPC_2E_INEXACTEXCEPTION 0x12
450 * 0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 6 7 8 930 1
451 * +-------+-------+-------+-------+-------+-------+-------+-------+
453 * +-------+-------+-------+-------+-------+-------+-------+-------+
456 #define Exceptiontype(object) Bitfield_extract( 0, 6,object)
462 #define Set_exceptiontype(object,value) Bitfield_deposit(value, 0, 6,object)
469 * 0 1 2 3 4 5 6 7 8 910 1 2 3 4 5 6 7 8 920 1 2 3 4 5 6 7 8 930 1
470 * +-------+-------+-------+-------+-------+-------+-------+-------+
472 * +-------+-------+-------+-------+-------+-------+-------+-------+
478 #define Exceptionbit(object) Bitfield_extract( 31, 1,object)
502 #define Set_invalidflag() Bitfield_deposit(1,0,1,Fpustatus_register)
508 #define Clear_all_flags() Bitfield_deposit(0,0,5,Fpustatus_register)
512 #define Clear_tbit() Bitfield_deposit(0,25,1,Fpustatus_register)
538 (int )Extall(extent) = 0 - (int )Extall(extent)
539 #define Ext_setone_low(extent) Bitfield_deposit(1,31,1,extent)
540 #define Ext_setzero(extent) Extall(extent) = 0
546 #define NONE 0
550 #define FTEST (1<<2) | 0
551 #define FCPY (2<<2) | 0
552 #define FABS (3<<2) | 0
553 #define FSQRT (4<<2) | 0
554 #define FRND (5<<2) | 0
556 #define FCNVFF (0<<2) | 1
561 #define FCMP (0<<2) | 2
563 #define FADD (0<<2) | 3