print floating pt using xmm0
Vikas N Kumar
vikasnkumar at users.sourceforge.net
Thu Oct 26 06:57:41 PDT 2006
But what is wrong with using cvtsi2ss ?
I want to print a 4byte floating point as opposed to a 8byte double .
Thanks
Vikas
On 10/26/06, Peter Johnson <peter at tortall.net> wrote:
> You need to use cvtsi2sd, not cvtsi2ss.
>
> Peter
>
> On Thu, 26 Oct 2006, Vikas N Kumar wrote:
>
> > Hi All
> > Below is my code to print a floating point number which has been
> > loaded into XMM0 register.
> > For some reason it always prints 0.0000. I am not able to figure it
> > out. Could anyone let me know what I am doing wrong here ? It seems
> > right based on the manual.
> >
> > section .data
> > fltprmpt db "%f",10,0
> >
> > section .text
> >
> > global main
> > extern printf
> >
> > main:
> > enter 0,0
> > mov rdi, dword fltprmpt
> > mov rdx, 10
> > cvtsi2ss xmm0, edx
> > mov rax, 1
> > call printf
> > leave
> > ret
> >
> > Regards,
> > Vikas
> > --
> > http://www.vikaskumar.org/
> > _______________________________________________
> > yasm-devel mailing list
> > yasm-devel at tortall.net
> > http://cvs.tortall.net/mailman/listinfo/yasm-devel
> >
>
--
http://www.vikaskumar.org/
More information about the yasm-devel
mailing list