Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mmintl.UUCP Path: utzoo!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.arch Subject: Re: Re: RISC (really on multiplication d Message-ID: <493@mmintl.UUCP> Date: Tue, 16-Jul-85 14:57:01 EDT Article-I.D.: mmintl.493 Posted: Tue Jul 16 14:57:01 1985 Date-Received: Sat, 20-Jul-85 04:28:54 EDT References: <149@mips.UUCP> <600005@pbear.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 17 Summary: Multiply instructions aren't defined right, anyhow With all the discussion about multiplies, let me express one of my pet peeves. Which is that integer multiplies are hardly ever (never, in my experience) defined in a manner suitable for their most common use. I would guess, conservatively, that well over 90% of the integer multiplies that are done generate a result with no more bits than the larger of the two operands. That is, one multiplies two words and wants a word result. But hardware multiplies invariably generate a two word result, leaving the high-order word to be allowed for and/or disposed of. This is a problem equally for compilers and hand-written assembler code. The same problem occurs for division. Incidently, re the subscript computation problem, why not a command which multiplies a word by a one-byte constant? This would deal cleanly with most two-dimensional arrays and arrays of structures, yet should be implementable as a reasonably efficient instruction.