Path: utzoo!attcan!uunet!wuarchive!texbell!cs.utexas.edu!usc!apple!mips!winchester!mash From: mash@mips.COM (John Mashey) Newsgroups: comp.arch Subject: Re: MIPS 64x32 Divide? Message-ID: <39213@mips.mips.COM> Date: 1 Jun 90 20:13:00 GMT References: <9462@pt.cs.cmu.edu> Sender: news@mips.COM Reply-To: mash@mips.COM (John Mashey) Organization: MIPS Computer Systems, Inc. Lines: 24 In article <9462@pt.cs.cmu.edu> chiles@cs.cmu.edu writes: >This is a general query of how to do 64-bit by 32-bit division when a >machine only gives you a 32-bit by 32-bit instruction. At first I was >shocked that MIPS didn't offer this since a 32-bit by 32-bit multiply >potentially results in a 64-bit result, and I expected to be able to >reverse the operation. I suspect all of their intensive profiling has >revealed that C programs only ever divide a long integer by a long integer >at best. I wonder if they profiled any languages that support infinite >precision integer arithmetic? Maybe they did, and what they found is that >conventional computing almost never requires a 64x32 divide. Whether they require it or not, in general, it's something hard to specify from most languages, and so of coruse, it never shows up in thr profiles. Although I think it was discussed, it dropped out as a possibility very early [like, 1Q85]. However, in any case, it turns out that 64/32->32 requires a 64-bit wide datapath, which would have caused serious chip layout problems in the middle of something where every other integer thing was 32-wide. (32/32->32 is OK, and so is 32*32->64, i.e., / is a worse problem than *). -- -john mashey DISCLAIMER: UUCP: mash@mips.com OR {ames,decwrl,prls,pyramid}!mips!mash DDD: 408-524-7015, 524-8253 or (main number) 408-720-1700 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086