Re: Q: void* vs. unsigned long (fwd)

Nat Lanza (magus@cs.cmu.edu)
17 Feb 1999 13:19:10 -0500


David Luyer <luyer@ucs.uwa.edu.au> writes:

> Although, if you look at the old SPEC benchmarks for Alphas, you'll find
> a 4 line long list of compiler options, among them options to use 32 bit
> longs and pointers. While the Alpha is a 64-bit machine, it must have
> benchmarked better as 32-bit initially.

Do you mean the '-taso', '-xtaso', and '-xtaso_short' flags to DEC's
cc? Those are largely intended to make it easier to port broken
programs which assume that all the world's a 32-bit machine to
Alphas. 64-bit-unclean code is annoyingly common, so that's a handy
flag to have.

According to the DEC cc manpage:

-taso
Tell the linker that the executable file should be loaded in the
lower 31-bit addressable virtual address range. The -T and -D
flags to the ld command can also be used to ensure that the text
and data segments addresses, respectively, are loaded into low
memory.

The -taso flag, however, in addition to setting default
addresses for text and data segments, also causes shared
libraries linked outside the 31-bit address space to be
appropriately relocated by the loader. If you specify -taso and
also specify text and data segment addresses with -T and -D,
those addresses override the -taso default addresses. The -taso
flag is useful for porting 32-bit programs to DEC OSF/1.

[ ... ]

-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.

--nat

-- 
nat lanza --------------------- research programmer, parallel data lab, cmu scs
magus@cs.cmu.edu -------------------------------- http://www.cs.cmu.edu/~magus/
there are no whole truths; all truths are half-truths -- alfred north whitehead

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/