[comp.windows.x] Purdue 2.0 2.1 on VAX with gcc 1.34

thewalt@RITZ.CIVE.CMU.EDU (Chris Thewalt) (03/13/89)

The asm statements introduced into maskbits.h for a vax no longer
compile on a MicroVAX-II with gcc-1.34. The error says :

output operand constraint lacks `='.

I notice the Sun asm statements have ='s on their output operands, but
the vax statements do not. Do I just insert ='s in front of the "g" (get)
and "m" (put) or is there something more to this. I am asking because
I'm not familiar with the gnu asm mechanism.

Thanks,
Chris					


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Christopher Robin Thewalt		These opinions are not necessarily
thewalt@ce.cmu.edu			shared by my employer...
Carnegie Mellon University
-- 

mb@ttidca.TTI.COM (Michael Bloom) (03/14/89)

This is what I'm using:
-------------
#ifdef vax
#define FASTGETBITS(psrc,x,w,dst) \
    asm ("extzv %1,%2,%3,%0" \
	 : "=g" (dst) \
	 : "g" (x), "g" (w), "m" (*(char *)(psrc)))
#define getbits(psrc,x,w,dst) FASTGETBITS(psrc,x,w,dst)

#define FASTPUTBITS(src, x, w, pdst) \
    asm ("insv %3,%1,%2,%0" \
	 : "=m" (*(char *)(pdst)) \
	 : "g" (x), "g" (w), "g" (src))
#define putbits(src, x, w, pdst) FASTPUTBITS(src, x, w, pdst)
#endif vax
-------------

By the way, if you're using a qdss, when you run your working server,
be sure to use the "-bs" option. The man page's mention of poor
performance without this option is an understatement!

And if you're running Ultrix and compiling on an NFS mounted file system,
compile everything twice and compare each object.  As of Ultrix 3.0
Digital ***STILL*** hasn't fixed the NFS client data corruption bug
that every other vendor fixed years ago.