Re: Emulating a 64-bit long with only 32 bits: code anyone?

gneuner@dyn.com (George Neuner)
31 May 2001 02:47:24 -0400

          From comp.compilers

Related articles
Emulating a 64-bit long with only 32 bits: code anyone? seanl@SPAM.jifsan.IS.cs.EVIL.umd.edu (Sean Luke) (2001-05-30)
Re: Emulating a 64-bit long with only 32 bits: code anyone? marcov@toad.stack.nl (2001-05-31)
Re: Emulating a 64-bit long with only 32 bits: code anyone? gneuner@dyn.com (2001-05-31)
Re: Emulating a 64-bit long with only 32 bits: code anyone? joewhaley@hotmail.com (John Whaley) (2001-06-03)
Re: Emulating a 64-bit long with only 32 bits: code anyone? Timothy_S_Coffey@bankone.com (2001-06-07)
Re: Emulating a 64-bit long with only 32 bits: code anyone? benji@wohnheim.uni-ulm.de (Markus Ackermann) (2001-06-08)
Re: Emulating a 64-bit long with only 32 bits: code anyone? marcov@toad.stack.nl (2001-06-08)
Re: Emulating a 64-bit long with only 32 bits: code anyone? Klaus.Bergdolt@gmx.de (2001-06-10)
Re: Emulating a 64-bit long with only 32 bits: code anyone? walter@nospamm-digitalmars.com (walter) (2001-06-14)
| List of all articles for this month |

From: gneuner@dyn.com (George Neuner)
Newsgroups: comp.compilers
Date: 31 May 2001 02:47:24 -0400
Organization: Automated Visual Inspection Systems, Inc.
References: 01-05-087
Keywords: arithmetic
Posted-Date: 31 May 2001 02:47:24 EDT

On 30 May 2001 00:21:12 -0400, Sean Luke
<seanl@jifsan.cs.umd.edu> wrote:


>hoping that someone may know where you can find open source for code which
>manipulates 64-bit longs (multiply, divide, subtract, add, shift, bitwise
>and logical operations, etc.) using only 32 bits


Sorry, I don't have code for you ... I was looking for some myself a
while back. The project requirements changed and I abandoned the
search before finding anything useful (to me).


If you want any performance at all, you'll have to drop into assembler
which is necessarily machine specific. High level languages don't
allow access to the CPU flags and trying to do multiple precision
arithmetic without overflow detection and carry is *slow* and painful.


Addition and subtraction are easy in assembler, the others not so much
depending on the native instruction set.


Good luck!


George Neuner
Automated Visual Inspection Systems, Inc.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.