From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,c9824e214e2c21c X-Google-Attributes: gid1164f8,public From: ron@topaz.sensor.com (Ron Natalie) Subject: Re: ALPHA SLOWER THAN PENTIUM !!!! Date: 1995/12/15 Message-ID: <4asgvl$2mq@topaz.sensor.com>#1/1 X-Deja-AN: 121941102 references: <4a72kn$bel@usenet.pa.dec.com> <4a8god$ir@masala.cc.uh.edu> <30CA6605.52DB@labiker.org> <4ak295$n10@zk2nws.zko.dec.com> <9512130000.AA25806@dxmint.cern.ch> <9512131649.AA15827@dxmint.cern.ch> <4angp1$bp5@topaz.sensor.com> <4aq03t$ksv@topaz.sensor.com> organization: Sensor Systems newsgroups: comp.sys.dec Dan Pop (danpop@mail.cern.ch) wrote: : In <4aq03t$ksv@topaz.sensor.com> ron@topaz.sensor.com (Ron Natalie) writes: : >Dan Pop (danpop@mail.cern.ch) wrote: : > : > : >: >It would be the nice to be able to use 32 bit pointers on the Alpha and : >: >the system supports it, but there is no compatibility with the system : >: >libraries if you run in this mode. : > : >: Of course there is. RTFM. : > : >You want to be a little less explicit. I've got a whole stack of : >manuals here. Which one tells me how to fix the library issue? : I already covered this issue when I followed up your article with the : subject "Compiler flags of dubious utility", in this very newsgroup. : Since you seem to have missed it, here we go again: : The cc man page is enough: : -xtaso : Cause the compiler to respond to the #pragma pointer_size preprocessor : directives which control pointer size allocations. This flag allows : you to specify 32-bit pointers when used in conjunction with the pragma : pointer_size directive. You must place pragmas where appropriate in : your program to use 32-bit pointers. Images built with this flag must : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : be linked with the -taso flag in order to run correctly. See the : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : Programmer's Guide for information on #pragma pointer_size. : -xtaso_short : Force the compiler to allocate 32-bit pointers by default. You can : still use 64-bit pointers, but only by the use of pragmas. : So, compile with -xtaso_short and link with -taso. : ues5:~/tmp 11> cat test.c : #include : int main() : { : char *msg = "Hello, world!"; : printf("%ld\n", (long)sizeof msg); : puts(msg); : return 0; : } : ues5:~/tmp 12> cc -c -xtaso_short test.c : ues5:~/tmp 13> cc -taso test.o : ues5:~/tmp 14> ./a.out : 4 : Hello, world! : ues5:~/tmp 15> cc test.o : ues5:~/tmp 16> ./a.out : 4 : Segmentation fault (core dumped) : Looks like -taso fixes the library issue. It looks like you have an odd idea what corresponds to a conclusive test. Your application succceeds only because your pointer is passed in a register to the library function. Anything not so trivial will bomb... try this... #include int main() { fprintf(stdout, "Hello world!\n"); } -xtaso_short does make 32bit pointers, but all -taso does is force everything to be loaded blow the 4gig mark. The problem is that the libraries themselves, still use 32bit pointers and any structures that are used in your 32bit version that are used in the library functions will have severe disagreement as to the location and size of the various elements. -Ron