home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!sgiblab!adagio.panasonic.com!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
- From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
- Newsgroups: comp.os.vms
- Subject: Re: VAXC divide problems (V3.2)
- Date: 22 Jan 1993 13:29:05 GMT
- Organization: HST Wide Field/Planetary Camera
- Lines: 54
- Distribution: world
- Message-ID: <1josr1INN32k@gap.caltech.edu>
- References: <1993Jan22.060311.5226@cs.rit.edu>
- Reply-To: carl@SOL1.GPS.CALTECH.EDU
- NNTP-Posting-Host: sol1.gps.caltech.edu
-
- In article <1993Jan22.060311.5226@cs.rit.edu>, whd0675@cs.rit.edu (Walter H Dick, III) writes:
- >A statement in VAXC such as:
- >
- > i = (x + 511) / 512;
- >
- >generates ten or so instructions. Is there anyway to get it to generate:
- >
- > ADDL3 #511,x,R0
- > DIVL3 R0,#512,i
-
- Yet another unanswerable question! What version of VAX C are you using? How
- do your results differ from:
-
-
- TEST 22-JAN-1993 05:23:49 VAX C V3.2-044 Page 1
- V1.0 22-JAN-1993 05:22:42 $1$DIA0:[CARL]TEST.C;49 (1)
-
-
-
- 1 main()
- 2 { int x=3, i;
- 0000 main:
- 0000 0000 .entry main,^m<>
- 5E 0C C2 0002 subl2 #12,sp
- 00000000* EF 16 0005 jsb C$MAIN
- F8 AD 03 D0 000B movl #3,-8(fp)
-
- 3 1
- 4 1 i = (x + 511) / 512;
- 5C 000001FF 8F F8 AD C1 000F addl3 -8(fp),#511,ap
- 5C 00000200 8F C6 0018 divl2 #512,ap
- F4 AD 5C D0 001F movl ap,-12(fp)
-
- 5 1 }
- 50 01 D0 0023 movl #1,r0
- 04 0026 ret
- 04 0027 ret
-
-
-
- Command Line
- ------------
-
- CC/LIST/MACH TEST/NOOPT
-
-
- --------------------------------------------------------------------------------
- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
-
- Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My
- understanding of astronomy is purely at the amateur level (or below). So
- unless what I'm saying is directly related to VAX/VMS, don't hold me or my
- organization responsible for it. If it IS related to VAX/VMS, you can try to
- hold me responsible for it, but my organization had nothing to do with it.
-