My system doesn’t seem to like it when I call NaN(2):

cpu% cat tnan.c
#include <u.h>
#include <libc.h>

void
main(int, char**)
{
        double d = NaN();
        print("d = %f\n", d);

        exits(0);
}
cpu% 8c -FVw tnan.c
cpu% 8l tnan.8
cpu% 8.out
8.out 55798: suicide: sys: fp: invalid operation fppc=0x10a4 status=0x8081 
pc=0x00001028
cpu% acid 55798
/proc/55798/text:386 plan 9 executable

/sys/lib/acid/port
/sys/lib/acid/386
acid: stk()
main()+0x8 /usr/chesky/src/hak/lex/tnan.c:7
_main+0x31 /sys/src/libc/386/main9.s:16
acid: asm(main)
main 0x00001020 SUBL    $0x1c,SP
main+0x3 0x00001023     CALL    NaN(SB)
main+0x8 0x00001028     FMOVDP  F0,d+0x14(SP)
…

Why is this happening?

Also, what is Intel’s name for the FMOVDP instruction?

--Joel

Reply via email to