xref: /csrg-svn/usr.bin/f77/pass1.vax/conv.h (revision 47955)
1*47955Sbostic /*-
2*47955Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47955Sbostic  * All rights reserved.
422802Smckusick  *
5*47955Sbostic  * %sccs.include.proprietary.c%
6*47955Sbostic  *
7*47955Sbostic  *	@(#)conv.h	5.2 (Berkeley) 04/12/91
822802Smckusick  */
922802Smckusick 
1022802Smckusick #if (HERE != VAX || TARGET != VAX)
1122802Smckusick 	}}}}}	WRONG MACHINE!!!	}}}}}
1222802Smckusick #endif
1322802Smckusick 
1422802Smckusick /*  The code for converting the types of constants is not  */
1522802Smckusick /*  portable.  The problems involved in dealing with       */
1622802Smckusick /*  features such as reserved operands and byte orderings  */
1722802Smckusick /*  have proven very difficult to deal with in a portable  */
1822802Smckusick /*  manner.  Because of impending deadlines, I have put    */
1922802Smckusick /*  off trying to achieve portability.                     */
2022802Smckusick /*                                                         */
2122802Smckusick /*                             -Robert Paul Corbett        */
2222802Smckusick /*                              1983 May 1                 */
2322802Smckusick 
2422802Smckusick 
2522802Smckusick #define	BLANK	' '
2622802Smckusick 
2722802Smckusick #define MAXWORD  32767
2822802Smckusick #define MINWORD -32768
2922802Smckusick 
3022802Smckusick typedef
3122802Smckusick   struct Dreal
3222802Smckusick     {
3322802Smckusick       unsigned fract1: 7;
3422802Smckusick       unsigned exp: 8;
3522802Smckusick       unsigned sign: 1;
3622802Smckusick       unsigned fract2: 16;
3722802Smckusick       unsigned fract3: 16;
3822802Smckusick       unsigned fract4: 16;
3922802Smckusick     }
4022802Smckusick   dreal;
4122802Smckusick 
4222802Smckusick typedef
4322802Smckusick   struct Quad
4422802Smckusick     {
4522802Smckusick       long word1;
4622802Smckusick       long word2;
4722802Smckusick     }
4822802Smckusick   quad;
4922802Smckusick 
5022802Smckusick typedef
5122802Smckusick   union RealValue
5222802Smckusick     {
5322802Smckusick       double d;
5422802Smckusick       quad   q;
5522802Smckusick       dreal  f;
5622802Smckusick     }
5722802Smckusick   realvalue;
58