Hi asm wizards!
I am adding 128 bit integer sup****t to my compiler system, and I need to
convert an int128 into a long double (80 bits floating point)
I developed this macro for doing this. Do you see something wrong here?
I have tested it and seems to be working but I am not 100% sure.
push $64
fildl (%%rsp)
leaq some_address,%%rcx
;;
;; load higher part of the 128 bit number into the FPU
fildt 8(%%rcx)
;; multiply by 2^64
fscale
;;
;; load lower part of the 128 bit number
fildt (%%rcx)
faddp
;; cleanup the FPU stack
fstpl %%st(1)
;; cleanup the stack
addq $8,%%rsp
Thanks in advance
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32