🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #1392

Re: Double Width Integer Multiplication and Division

#1392
From: John Hascall
Date: Mon, 03 Jul 1989 13:49
54 lines
3461 bytes
In article <1380@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes:
>In article <1046@aber-cs.UUCP>, pcg@aber-cs.UUCP (Piercarlo Grandi) writes:
>> In article <1370@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes:
>>  In article <1035@aber-cs.UUCP>, pcg@aber-cs.UUCP (Piercarlo Grandi) writes:
>>  > In article <1989Jun26.195044.4197@cs.rochester.edu> crowl@cs.rochester.edu
>>  > (Lawrence Crowl) writes:
>>  > 
>>  > 	[1] You are not supposed to write assembler programs on a RISC
>>  > 	    machine. The compilers have sophisticated algorithms to generate
>>  > 	    "optimal" multiplication/division out of simpler instructions.
 
>You do not understand.  A very good optimizinng compiler (and I have not
>seen one) can do a better job of doing a particular complex operation than
>I can, PROVIDED that I want to do that operation.  If my algorithm is
>necessarily broken down into operations that the compiler writers have
>taken into consideration. the compiler might be able to do better than
>I can.  But even this has a caveat; I am not confined to a single algorithm,
>and my choice of algorithms is decidedly influenced by machine properties.
>In most cases, I do not need run-time profiling; I know my algorithms.
 
    [...continues this thread for a while (quite well, I might add)...]

  Then makes the bold statement:

>What is there to know?  I have not seen a computer instruction set where
>the user instructions(1)
>are anywhere near as complicated as Fortran or C.

   I would venture some of the VAX instructions are more "complicated"
   than Fortran or C (this is why "RISC"ers love to flame it so much--
   besides its commercial success, of course).  A few examples:

      FF{CS}         Find First {Clear|Set} Bit in a field.
      CMP[Z]V        Compare [un]signed bitfield with [un]signed integer
      INDEX          Compute (multi-dimensional) array subscript
      {INS|REM}QUE   Insert/Remove entry to/from a queue
      EMOD           Extended Multiply and Integerize
      POLY           Polynomial Evaluation
      MATCHC         Find substring in a string
      MOVTUC         Move translated until ("escape") character
      SPANC          Span Characters (read the descripion of this one sometime)
      CRC            Calculate Cyclic Redundancy Check
      EDITPC         Edit Packed to Character Strings (i.e., COBOL PICtures)

(1) [original parenthetical material moved here for clarity]
>  (I am excluding much of the supervisory and kernel stuff, which a user
>  will not be able to access on a multi-user system, although the user
>  should be able to discuss problems with those who can)

    I would assert that the above instructions are at least as complicated
    as any single concept (statement-type, operator, etc.) in Fortran or C.
    (And we haven't even looked at addressing modes yet.)

John Hascall  /  ISU Comp Center  /  Ames, IA
Technical Details
Message-ID: <1163@atanasoff.cs.iastate.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!deimos.cis.ksu.edu!atanasoff!hascall
References: <1046@aber-cs.UUCP> <1380@l.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!deimos.cis.ksu.edu!atanasoff!hascall
From: hascall@atanasoff.cs.iastate.edu (John Hascall)
Newsgroups: comp.arch
Subject: Re: Double Width Integer Multiplication and Division
Message-ID: <1163@atanasoff.cs.iastate.edu>
Date: 3 Jul 89 13:49:40 GMT
References: <1046@aber-cs.UUCP> <1380@l.cc.purdue.edu>
Reply-To: hascall@atanasoff.cs.iastate.edu.UUCP (John Hascall)
Organization: Iowa State Univ. Computation Center
Lines: 54