[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freewnn:00194] Re: FreeWnn-1.1.1-a012がタイムアウトします
濱嶋@YDCです
IA-32知っている人、教えてください
> 一度カウンタを入れてみましたが、8回目で落ちたので何らかの条件がそろわな
> いと発生しないようです。[freewnn:00185]で片山@PFUさんが書かれたサン
> プルでは、何か条件が足らないようです(サンプルは2.2.8でも問題なく動きまし
do_hindo_s.cのRAND()を使っているところにbreak pointを仕掛けてfloating
registerを表示してみました
表示されるデータの一行目最後にある "top" が減っています。たしか8087系は
registerをstackのようにして使うと本で読んだことがありますが、これが直接
的な原因なのでしょうか?
# registerが8本で、8回目に落ちる。うーん、すじつまはあっているように思
# える
にしくさんのところのOpenBSD/i386では起らないようなので、これが原因なら
drand48()でなくFreeBSDのfloating registerの扱い方がおかしいということに
なります
Breakpoint 3, hindo_set (dic_no=0, entry=13600, imaop=-3, hinop=-3)
at do_hindo_s.c:178
(gdb) info float
status 0x3920: exceptions: LOS; flags: 0001; top 7
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(0) => valid 3ffc8ceefecd44040000 0.13763
%st(7) empty 3ffcccccccccccccd000 0.2
%st(6) empty 403ce8cc8dd1d8e9d1c0 4.19373e+18
%st(5) empty 403d92bc7ac2e874dcf0 5.28673e+18
%st(4) empty 403dbc7ad8c474e6da74 6.7907e+18
%st(3) empty 403ce93578f5c98ce91c 4.20112e+18
%st(2) empty 403ce8e08dd1a4e9bd94 4.19514e+18
%st(1) empty 403d8ab87a82a474e8ea 4.99794e+18
(gdb) c
Continuing.
Breakpoint 3, hindo_set (dic_no=0, entry=7336, imaop=-3, hinop=-3)
at do_hindo_s.c:178
(gdb)info float
status 0x3120: exceptions: LOS; flags: 0001; top 6
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(1) valid 3ffc8ceefecd44040000 0.13763
%st(0) => valid 3ffdfa7c8a18c6f00000 0.489231
%st(7) empty 3ffcccccccccccccd000 0.2
%st(6) empty 403d92bc7ac2e874dcf0 5.28673e+18
%st(5) empty 403dbc7ad8c474e6da74 6.7907e+18
%st(4) empty 403ce93578f5c98ce91c 4.20112e+18
%st(3) empty 403ce8e08dd1a4e9bd94 4.19514e+18
%st(2) empty 403d8ab87a82a474e8ea 4.99794e+18
(gdb) c
Continuing.
Breakpoint 3, hindo_set (dic_no=3, entry=2691, imaop=-3, hinop=-3)
at do_hindo_s.c:178
(gdb) info float
status 0x2920: exceptions: LOS; flags: 0001; top 5
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(2) valid 3ffc8ceefecd44040000 0.13763
%st(1) valid 3ffdfa7c8a18c6f00000 0.489231
%st(0) => valid 3ffe9c924a442a230000 0.611607
%st(7) empty 3ffd8000000000000000 0.25
%st(6) empty 403dbc7ad8c474e6da74 6.7907e+18
%st(5) empty 403ce93578f5c98ce91c 4.20112e+18
%st(4) empty 403ce8e08dd1a4e9bd94 4.19514e+18
%st(3) empty 403d8ab87a82a474e8ea 4.99794e+18
(gdb) c
Continuing.
Breakpoint 3, hindo_set (dic_no=0, entry=13600, imaop=-3, hinop=-3)
at do_hindo_s.c:178
(gdb)info float
status 0x2120: exceptions: LOS; flags: 0001; top 4
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(3) valid 3ffc8ceefecd44040000 0.13763
%st(2) valid 3ffdfa7c8a18c6f00000 0.489231
%st(1) valid 3ffe9c924a442a230000 0.611607
%st(0) => valid 3ffdfe261e4ac5e40000 0.496385
%st(7) empty 3ffcccccccccccccd000 0.2
%st(6) empty 403ce93578f5c98ce91c 4.20112e+18
%st(5) empty 403ce8e08dd1a4e9bd94 4.19514e+18
%st(4) empty 403d8ab87a82a474e8ea 4.99794e+18
(gdb) info float
status 0x2120: exceptions: LOS; flags: 0001; top 4
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(3) valid 3ffc8ceefecd44040000 0.13763
%st(2) valid 3ffdfa7c8a18c6f00000 0.489231
%st(1) valid 3ffe9c924a442a230000 0.611607
%st(0) => valid 3ffdfe261e4ac5e40000 0.496385
%st(7) empty 3ffcccccccccccccd000 0.2
%st(6) empty 403ce93578f5c98ce91c 4.20112e+18
%st(5) empty 403ce8e08dd1a4e9bd94 4.19514e+18
%st(4) empty 403d8ab87a82a474e8ea 4.99794e+18
(gdb) c
Continuing.
Breakpoint 3, hindo_set (dic_no=0, entry=7336, imaop=-3, hinop=-3)
at do_hindo_s.c:178
(gdb) info float
status 0x1920: exceptions: LOS; flags: 0001; top 3
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(4) valid 3ffc8ceefecd44040000 0.13763
%st(3) valid 3ffdfa7c8a18c6f00000 0.489231
%st(2) valid 3ffe9c924a442a230000 0.611607
%st(1) valid 3ffdfe261e4ac5e40000 0.496385
%st(0) => valid 3ffe8bb81ce88d150000 0.545778
%st(7) empty 3ffcccccccccccccd000 0.2
%st(6) empty 403ce8e08dd1a4e9bd94 4.19514e+18
%st(5) empty 403d8ab87a82a474e8ea 4.99794e+18
(gdb) c
Continuing.
Breakpoint 3, hindo_set (dic_no=3, entry=2691, imaop=-3, hinop=-3)
at do_hindo_s.c:178
(gdb) info float
status 0x1120: exceptions: LOS; flags: 0001; top 2
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(5) valid 3ffc8ceefecd44040000 0.13763
%st(4) valid 3ffdfa7c8a18c6f00000 0.489231
%st(3) valid 3ffe9c924a442a230000 0.611607
%st(2) valid 3ffdfe261e4ac5e40000 0.496385
%st(1) valid 3ffe8bb81ce88d150000 0.545778
%st(0) => valid 3ffef9808320effc0000 0.974617
%st(7) empty 3ffd8000000000000000 0.25
%st(6) empty 403d8ab87a82a474e8ea 4.99794e+18
(gdb) c
Continuing.
Breakpoint 3, hindo_set (dic_no=0, entry=13600, imaop=-3, hinop=-3)
at do_hindo_s.c:178
(gdb) info float
status 0x920: exceptions: LOS; flags: 0001; top 1
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x21c; pc 0x1f:0x12269; operand 0x27:0xefbfd7d8
regno tag msb lsb value
%st(6) valid 3ffc8ceefecd44040000 0.13763
%st(5) valid 3ffdfa7c8a18c6f00000 0.489231
%st(4) valid 3ffe9c924a442a230000 0.611607
%st(3) valid 3ffdfe261e4ac5e40000 0.496385
%st(2) valid 3ffe8bb81ce88d150000 0.545778
%st(1) valid 3ffef9808320effc0000 0.974617
%st(0) => valid 3ffed3ed30f296570000 0.827838
%st(7) empty 3ffcccccccccccccd000 0.2
(gdb) c
Continuing.
Program received signal SIGFPE, Arithmetic exception.
0x2007599d in ldexp ()
(gdb) info float
u: status 0x83e1: exceptions: INVALID LOS FPSTACK; flags: 0011; top 0
e: status 0x300: flags: 0011; top 0
control 0x1272: compute to 53 bits; round NEAREST; mask: DENORM UNDERF LOS;
last instruction: opcode 0x545; pc 0x1f:0x2007599a; operand 0x27:0xefbfd79c
regno tag msb lsb value
%st(7) valid 3ffc8ceefecd44040000 0.13763
%st(6) valid 3ffdfa7c8a18c6f00000 0.489231
%st(5) valid 3ffe9c924a442a230000 0.611607
%st(4) valid 3ffdfe261e4ac5e40000 0.496385
%st(3) valid 3ffe8bb81ce88d150000 0.545778
%st(2) valid 3ffef9808320effc0000 0.974617
%st(1) valid 3ffed3ed30f296570000 0.827838
%st(0) => valid c004c000000000000000 -48
(gdb) disassemble
Dump of assembler code for function ldexp:
0x20075994 <ldexp>: pushl %ebp
0x20075995 <ldexp+1>: movl %esp,%ebp
0x20075997 <ldexp+3>: fildl 0x10(%ebp)
0x2007599a <ldexp+6>: fldl 0x8(%ebp)
0x2007599d <ldexp+9>: fscale
0x2007599f <ldexp+11>: fstp %st(1)
0x200759a1 <ldexp+13>: leave
0x200759a2 <ldexp+14>: ret
0x200759a3 <ldexp+15>: addb %al,(%eax)
0x200759a5 <ldexp+17>: addb %al,(%eax)
0x200759a7 <ldexp+19>: addb %al,(%eax)
0x200759a9 <ldexp+21>: addb %al,(%eax)
0x200759ab <ldexp+23>: addb %al,(%eax)
0x200759ad <ldexp+25>: addb %al,(%eax)
0x200759af <ldexp+27>: addb %dl,0xffffff89(%ebp)
End of assembler dump.