converting an unsigned 64 bit in a FPU double



Hi

Suppose following:

You got in some general 64 bit reg (say rax) an unsigned
number and you want to convert it to long double
(FPU 80 bits)

The best I thought can be done is:
(using gcc notation)

push $0
push rax
fldq (%rsp)
addq $16,%rsp

Any better ideas?

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32

.



Relevant Pages

  • Re: converting an unsigned 64 bit in a FPU double
    ... You got in some general 64 bit reg (say rax) an unsigned ... (FPU 80 bits) ... BCET Basic Compiler Page: http://www.arargh.com/basic/index.html ...
    (comp.lang.asm.x86)
  • Re: Sionnach--NADAC rule ?
    ... histories on-line a LONG time ago, although I know it was a gargantuan task. ... if they'd had the sense to be tracking scores by reg. ... people I know have gotten certs in a semi-timely manner, ... using three different names for her dog over the years (Jake, Jacob, and Sir ...
    (rec.pets.dogs.breeds)
  • Re: converting an unsigned 64 bit in a FPU double
    ... You got in some general 64 bit reg (say rax) an unsigned ... That expects to load a floating point value. ... extended uint64_to_extended(uint64_t u64) ... jacob at jacob point remcomp point fr ...
    (comp.lang.asm.x86)