From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,469f07ffe3d265a4 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-12-02 16:08:40 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!crl.dec.com!crl.dec.com!jac.zko.dec.com!eps.enet.dec.com!vandenheuvel From: vandenheuvel@eps.enet.dec.com (Hein RMS van den Heuvel) Newsgroups: comp.sys.dec Subject: Re: Conditional move instruction (CMOV) Date: 2 DEC 94 17:27:55 Organization: Digital Equipment Corporation Distribution: world Message-ID: <3bo7gj$c26@jac.zko.dec.com> References: <3bnd09$i0t@vixen.cso.uiuc.edu> NNTP-Posting-Host: AMUZED In article <3bnd09$i0t@vixen.cso.uiuc.edu>, dconnors@cehpx13.cen.uiuc.edu (connors daniel a) writes... >I have access to a DEC Alpha station, and have been running some SPEC >benchmarks. I wanted to see how often the CMOV (integer or floating pt) >instruction was invoked in any of the SPEC benchmarks. > >I've tried unsuccessfully to get the CMOV instruction to be used by >the compiler. I have even wrote code which I think would be the ideal >C construction for the CMOV. Probably not overly helpfull, but the following little bit of C smaple will at least make the DEC C compiler generate a CMOVne : int test(int a) { int b; b = 1; if (a==123) b=2; return b; } TEST:: ; 000001 XOR a, 123, R16 ; 000005 MOV 1, R0 CMOVEQ R16, 2, R0 RET R26 ; 000006 Regards, +--------------------------------------+ Hein van den Heuvel, Digital. | All opinions expressed are mine, and | "Makers of VMS and other | may not reflect those of my employer | fine Operating Systems." +--------------------------------------+