From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,8153c81143361581,start X-Google-Attributes: gidfee84,public From: mischa_sandberg@mindlink.bc.ca Subject: Q: The perils of 32-bit mode? Date: 1996/11/14 Message-ID: <56eh4a$9d@fountain.mindlink.net>#1/1 X-Deja-AN: 196383680 organization: MIND LINK! - British Columbia, Canada newsgroups: comp.unix.osf.osf1 I'm in the process of porting a system from 32-bit Unixes to an Alpha running OSF/1. The code makes many assumptions about LONG and POINTER types being 32 bits. The first attempt at simply letting the chips fall where they might in 64-bit mode were pretty dismal. I've recompiled the system using "cc -c -xtaso_short" and "cc -taso" to (per the documentation) create a program that uses 32-bit pointers and is loaded into the 32bit address space. This doesn't solve my problem with longs, but, one step at a time, right? The resulting executable displays "anomalous" behaviour off the bat. The main routine is your standard "int main(int argc, char **argv)", and when I invoke the program with a single argument, "argc" is as expected (2), and argv[0] is the name of the program --- but argv[1] is always NULL. This posting amounts to three questions: (1) What the heck might I doing wrong? A simple "hello, world" program, predictably, does NOT betray this same weirdness related to argv[1]. (2) Are there are any hidden gotchas in using -taso/-xtaso_short? What happens if I need to use a library that was compiled for 64 bits --- are pointers properly coerced, or am I out of luck? (3) Should I expect a significant performance hit? This is a network-traffic-intensive application, not a compute-intensive one. Many thanks in advance. It sure is fun to play with this sucker; the Alpha is *fast*. Engineers believe that the equations approximate reality. Physicists believe that reality approximates the equations. Mathematicians never make the connection.