|Integer division firstname.lastname@example.org (dz) (2010-12-27)|
|Re: Integer division derek@_NOSPAM_knosof.co.uk (Derek M. Jones) (2010-12-29)|
|Re: Integer division email@example.com (glen herrmannsfeldt) (2010-12-30)|
|Re: Integer division firstname.lastname@example.org (robin) (2011-01-03)|
|Date:||Mon, 3 Jan 2011 02:29:59 +1100|
|Posted-Date:||02 Jan 2011 20:41:33 EST|
From: "glen herrmannsfeldt" <email@example.com>
Sent: Thursday, 30 December 2010 9:03 PM
> dz <firstname.lastname@example.org> wrote:
>> I am looking for references on how to support general 32 bit
>> integer division (not just invariants) on hardware without dedicated
>> integer-division support and 64 bit floating point support.
> Well, there is always the shift/subtract loop generating
> one bit at a time. Either the restoring or non-restoring
> division algorithm should be easy to find. Many processors without
> hardware divide have instruction to make this easier, such as
> rotate and rotate through carry.
Whether restoring or not, rotate and rotate thru carry are not
required. All that is needed is shift and add/subtract.
Both methods have been used from the early days when computers did not
have an integer divide instruction. Even when the computer did have a
hardware instruction, one of the above methods was used to check that
the hardware divide instruction was working correctly.
Return to the
Search the comp.compilers archives again.