[M3devel] Alpha is 32bits!

Mika Nystrom mika at async.async.caltech.edu
Wed Apr 21 10:10:22 CEST 2010



I remember that DEC cc had options on OSF/1 to use memory in such a
way that you could guarantee the first 4 GB you touched were sign-extended
32-bit numbers (so the upper doubleword was 0xffffffff or 0x00000000 always)
for some sort of compatibility.

But Alpha doesn't have hardware instructions to do memory references with
32-bit pointers as far as I remember.  I have the architecture reference
here to look in...

    Mika

Jay K writes:
>
>Huh. I found that OpenVMS on Alpha is a hybrid 32bit/64bit system.
>
>The default pointer size is 32 bits. You can change it to 64 bits with comp=
>iler command line option.
>I guess this is for greater compatibility with VAX.
>There are two of many functions. Some are missing in 64 bits.
>size_t is always 32 bits!
>
>http://www.openvms.compaq.com/doc/72final/6467/6467pro_contents.html
>esp. http://www.openvms.compaq.com/doc/72final/6467/6467pro_006.html#64_bit=
>_obtaining_long_ptrs_sec
>
>and newer similar: http://www.openvms.compaq.com/doc/83final/5763/5763pro_0=
>07.html#the_64_bit_sec
>
>WALLIS> type jmpbuf.c
>
>#include <setjmp.h>
>
>#include <stdio.h>
>
>#include <stddef.h>
>
>
>
>#define SIZE(x) ((unsigned)sizeof(x))
>
>
>
>int main()
>
>{
>
>=A0 printf("%u %u %u %u %u\n"=2C
>
>=A0=A0=A0 SIZE(int)=2C
>
>=A0=A0=A0 SIZE(long)=2C
>
>=A0=A0=A0 SIZE(void*)=2C
>
>=A0=A0=A0 SIZE(size_t)=2C
>
>=A0=A0=A0 SIZE(jmp_buf))=3B
>
>=A0 return 0=3B
>
>}
>
>
>
>WALLIS> cc jmpbuf.c
>
>WALLIS> link jmpbuf.obj
>
>WALLIS> run jmpbuf
>
>4 4 4 4 544
>
>
>
>WALLIS> cc /pointer_size=3D64 jmpbuf.c
>
>WALLIS> link jmpbuf.obj
>
>WALLIS> run jmpbuf
>
>4 4 8 4 544
>
>
>
>I still haven't found the actual header files!
>
>
>So I'm going to work toward ALPHA32_VMS for now.
>I can try ALPHA64_VMS later.
>Assuming m3cg offers -m32 and -m64 to handle this. :)
>
>=A0- Jay
> 		 	   		  =



More information about the M3devel mailing list