From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <459EB670.1090900@cs.cmu.edu> Date: Fri, 5 Jan 2007 15:34:56 -0500 From: Philip Dye User-Agent: Thunderbird 1.5.0.4 (X11/20060614) MIME-Version: 1.0 To: 9fans@cse.psu.edu Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [9fans] acid - i386 floating point register issue ? Topicbox-Message-UUID: fe422aba-ead1-11e9-9d60-3106f5b1d025 On an i386, I am unable to get acid to properly report the values in the floating point registers. Could someone please explain what I am doing wrong ? Thank you, Philip Dye - - - - - Simple example: #include #include void main ( void ) { double x ; x = atof("3.5") ; print("===== main x = %g\n",x) ; exits(nil) ; } Use: example : acid 8.out 8.out:386 plan 9 executable /sys/lib/acid/port /sys/lib/acid/386 acid: new() 7118: system call _main SUBL $0x48,SP 7118: breakpoint main+0x3 MOVL $.string(SB),AX acid: asm(main) main 0x00001020 SUBL $0x1c,SP main+0x3 0x00001023 MOVL $.string(SB),AX main+0x8 0x00001028 MOVL AX,0x0(SP) main+0xb 0x0000102b CALL atof(SB) main+0x10 0x00001030 FMOVDP F0,x+0x14(SP) main+0x14 0x00001034 MOVL $.string+0x4(SB),AX main+0x19 0x00001039 MOVL AX,0x0(SP) main+0x1c 0x0000103c FMOVD x+0x14(SP),F0 main+0x20 0x00001040 FMOVDP F0,0x4(SP) main+0x24 0x00001044 CALL print(SB) main+0x29 0x00001049 ADDL $0x1c,SP main+0x2c 0x0000104c RET _main 0x0000104d SUBL $0x48,SP acid: bpset(main+0x10) acid: cont() 7118: breakpoint main+0x10 FMOVDP F0,x+0x14(SP) acid: fpr() F0 0. F1 0. F2 0. F3 0. F4 0. F5 0. F6 0. F7 0. control 0x0272 status 0x3900 tag 0x3fff ip offset 0x00001743 cs selector 0x0023 opcode 0xe907 data operand offset 0xeee8 operand selector 0x001b acid: print("===== ACID F0 = ",*(F0\F),"\n") ===== ACID F0 = 0 acid: cont() ===== main x = 3.5 7118: breakpoint main+0x14 MOVL $.string+0x4(SB),AX :9: (error) msg: pid=7118 startstop: process exited - - - - -