home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / arch / 10981 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.7 KB  |  36 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
  3. From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
  4. Subject: Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms)
  5. Message-ID: <9232615.9614@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. References: <TMB.92Nov13144057@arolla.idiap.ch> <1992Nov13.155126.3660@linus.mitre.org> <TMB.92Nov14145619@pollux.idiap.ch> <7899@charon.cwi.nl>
  9. Date: Sat, 21 Nov 1992 04:07:32 GMT
  10. Lines: 24
  11.  
  12. dik@cwi.nl (Dik T. Winter) writes:
  13.  
  14. >But wait.  SPARC version 7 does not have an integer multiply instruction,
  15. >it uses multiply step.  When you code the multiply in assembly you will
  16. >find that you get a 64 bit result, but in C it is not possible to
  17. >retrieve that result.  Doing it with inline assembly is not what you
  18. >want in general (>32 instructions inline assembly), so you do it
  19. >out-of-line.  Hence it is not sufficient to have good inliners, on
  20. >some platforms you need out of line assembly routines to do what you
  21. >want, and no, the compilers do not help.  (The same holds for HP-PA 1,
  22. >IBM PC-RT, AMD 29k and a few more.)  So the operation is available but
  23. >you do not get it.
  24. >
  25. >So let's see.  You promote the GCC interface with asm.  How do you
  26. >code the 32x32->64 multiply on the SPARC in GCC?
  27.  
  28. Just put the asm code in a (non-inline) function, instead of in a macro or
  29. inline function.
  30.  
  31. -- 
  32. Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
  33. This .signature virus is a self-referential statement that is true - but 
  34. you will only be able to consistently believe it if you copy it to your own
  35. .signature file!
  36.