我要做的就是使用printf函数打印一个浮点数。运行时,输出: 浮点数为-nan
为什么不输出存储的浮点数(5.93)?
%macro EXITPGM 0
mov eax, 0
call exit
%endmacro
section .data
flt1 dq 0.0
msg db "The floating point number is %f",10,0
section .text
global main
extern printf
extern exit
main:
push rbp
mov qword[flt1], __float64__(5.93)
mov rdi, msg
mov rax, 1
movq xmm0, qword [flt1]
call printf
pop rbp
EXITPGM