Assembly or ....

Herman Rubin cik at l.cc.purdue.edu
Wed Nov 30 04:50:56 AEST 1988


In article <949 at taux01.UUCP<, cjosta at taux01.UUCP (Jonathan Sweedler) writes:
< In article <8938 at winchester.mips.COM> mash at mips.COM (John Mashey) writes:
> |In article <1032 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:
> |...
> |> suppose we want to
> |>divide a by b, obtaining an integer result i and a remainder c.  I know
> |>of no machine with this instruction, and this is not that unusual an 
> |>instruction to demand.  It is cheap in hardware, and extremely expensive
> |>in software--at least 4 instructions.
> |
> |Although I don't necessarily subscribe to Herman's opinions, R2000 divides
> |actually do this (leave both results in registers).  
< 
< The 32000 series has a DEI (Divide Extended Integer) instruction that
< also does this. 

I do not know if I made it clear in my initial posting, but the problem
arises if the types of a, b, and c are floating.  Not that the quote from
my paper specifically has i an integer.
-- 
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Phone: (317)494-6054
hrubin at l.cc.purdue.edu (Internet, bitnet, UUCP)



More information about the Comp.lang.c mailing list