sparc 어셈블러에서의 atof 함수

jbh1657의 이미지

sparc 프로세서를 공부하고 있는데, atof함수가 실행이 안 됩니다..
atoi함수는 정상 출력되는것을 확인했는데, 뭐가 문제일까요? 결괏값은 -NaN이 나오네요..

.section ".data"
a: .double 0r0.0
sum: .double 0r0.0
 
fmt: .asciz "output = %g\n"
 
 
.align 4
 
.section ".text"
 
 
.global main, printf
 
main: save %sp, -96, %sp
set a, %l0
 
add %i1, 4, %i1
ld [%i1], %o0
call atof
nop
st %o0, [%l0]
 
set fmt, %o0
ld [%l0], %o1
call printf
nop
 
ret
restore
ajdsfljaslie의 이미지

atof 함수 반환값은 %f0 에 저장돼요ㅜ