From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6d6b37fafd4e154d X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-09-19 23:50:32 PST Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!agate!ames!decwrl!pa.dec.com!bier!neideck From: neideck@bier.enet.dec.com (Burkhard Neidecker-Lutz) Newsgroups: comp.unix.osf.osf1 Subject: Re: Porting 32 bit apps to alpha Date: 20 Sep 1993 06:44:11 GMT Organization: CEC Karlsruhe Message-ID: <27jjfrINNqil@usenet.pa.dec.com> References: <1993Sep20.021816.28935@news.qut.edu.au> NNTP-Posting-Host: BIER > >Does anyone know how to get the cc compiler to treat int and unsigned as >64 bit, to simplify porting of 32 bit applications, which assume pointers >are the same size as int? No way as it would break communication with almost all header files (the size of structures would change). There is the reverse option in the 1.3 compilers, called "-taso" (truncated address space option). While this keeps int at 32 and pointers at 64, it makes sure that the *value* of all pointers fits into 32 bits (hence if you assign a 64 pointer to a int, thus truncating it and later retrieve it again it becomes a valid address again by widening). >Does anyone have any useful tips for porting 32 bit applications? If you really want to port, make it 64 bit clean. Use lint -Q to find most of the places where thing go haywire. >And finally, does anyone know how to switch the Alpha into 32 bit mode? There is no 32 bit mode. The 32 bit usage of Alpha under VMS and NT is only due to the way the compilers generate code for it. Having 32 bit mode under OSF/1 would require all 32 bit libraries and headers to go with it plus an adaption layer in between to get from 32 bit system call interfaces to 64 bit interfaces. It should be noted that the latter already exists in the MXR subsystem for supporting translated MIPS/Ultrix applications. Burkhard Neidecker-Lutz Distributed Multimedia Group, CEC Karlsruhe Software Motion Pictures & BERKOM II Project Digital Equipment Corporation neideck@nestvx.enet.dec.com