From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1366 invoked by alias); 11 Jun 2009 15:18:39 -0000 Received: (qmail 1288 invoked by uid 22791); 11 Jun 2009 15:18:37 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from web36204.mail.mud.yahoo.com (HELO web36204.mail.mud.yahoo.com) (209.191.68.230) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 11 Jun 2009 15:18:30 +0000 Received: (qmail 76138 invoked by uid 60001); 11 Jun 2009 15:18:28 -0000 Message-ID: <651718.75903.qm@web36204.mail.mud.yahoo.com> Received: from [123.238.27.164] by web36204.mail.mud.yahoo.com via HTTP; Thu, 11 Jun 2009 08:18:28 PDT Date: Thu, 11 Jun 2009 15:18:00 -0000 From: paawan oza Subject: Re: Submition of i386.record.floating.point.patch To: Hui Zhu Cc: gdb-patches@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00301.txt.bz2 Hi Hui, please see the gdb output below, which gives us hint that we require all the floating point registers for i386, which you had suggested to separate and move it to amd64. please see the last command "info float" which gives status, tag, control registers (gdb) n 92 printf("result is %f\n",result); (gdb) result is 495830.968750 94 result = no1 - no2 - no3 - no4; (gdb) 95 printf("result is %f\n",result); (gdb) result is -181.778748 98 asm ("fld %0" : :"m"(*float_memory)); (gdb) 99 asm ("fchs"); (gdb) 102 asm ("fld %0" : :"m"(*float_memory)); (gdb) 103 asm ("f2xm1"); (gdb) 105 asm ("fyl2x"); (gdb) 107 asm ("fld %0" : :"m"(*float_memory)); (gdb) 108 asm ("fxtract"); (gdb) 110 asm ("fld %0" : :"m"(*float_memory)); (gdb) 111 asm ("fprem1"); (gdb) info float R7: Valid 0xc00a8026ae9a2fe9e7c1 -2050.417627513087141 R6: Valid 0x40028000000000000000 +8 R5: Valid 0x3fff8020c50000000000 +1.001000046730041504 =>R4: Valid 0x40078020c50000000000 +256.256011962890625 R3: Empty 0x00000000000000000000 R2: Empty 0x00000000000000000000 R1: Empty 0x00000000000000000000 R0: Empty 0x00000000000000000000 Status Word: 0x2020 PE TOP: 4 Control Word: 0x037f IM DM ZM OM UM PM PC: Extended Precision (64-bits) RC: Round to nearest Tag Word: 0x00ff Instruction Pointer: 0x73:0x0804897e Operand Pointer: 0x7b:0x0804a008 Opcode: Regards, Oza. --- On Fri, 6/5/09, Hui Zhu wrote: > From: Hui Zhu > Subject: Re: Submition of i386.record.floating.point.patch > To: "paawan oza" > Cc: gdb-patches@sourceware.org > Date: Friday, June 5, 2009, 3:48 AM > >> diff -urN > gdb.orig/i386-tdep.h gdb.new/i386-tdep.h > >> --- gdb.orig/i386-tdep.h 2009-05-17 > 17:56:44.000000000 -0400 > >> +++ gdb.new/i386-tdep.h 2009-05-31 > 16:33:14.000000000 -0400 > >> @@ -145,7 +145,22 @@ > >> I386_ES_REGNUM, /* %es */ > >> I386_FS_REGNUM, /* %fs */ > >> I386_GS_REGNUM, /* %gs */ > >> - I386_ST0_REGNUM /* %st(0) > */ > >> + I386_ST0_REGNUM, /* %st(0) > */ > >> + I386_ST1_REGNUM, /* %st(1) > */ > >> + I386_ST2_REGNUM, /* %st(2) > */ > >> + I386_ST3_REGNUM, /* %st(3) > */ > >> + I386_ST4_REGNUM, /* %st(4) > */ > >> + I386_ST5_REGNUM, /* %st(5) > */ > >> + I386_ST6_REGNUM, /* %st(6) > */ > >> + I386_ST7_REGNUM, /* %st(7) > */ > >> + I386_FCTRL, /* > floating point env regs : FCTRL-FOP */ > >> + I386_FSTAT, > >> + I386_FTAG, > >> + I386_FISEG, > >> + I386_FIOFF, > >> + I386_FOSEG, > >> + I386_FOOFF, > >> + I386_FOP > >> }; > >> > > > > About this part, I think this is my mistake. I > didn't take fp work > > for now very clear (Or I am still not clear with x86 > fp). > > FCTRL, FOP and so on are the fp reg of amd64. For > now, prec is still > > not support amd64 (I am working on it). > > And amd64's support are in amd64-tedp.... files. > Change i386_regnum > > is not a good idea. > > > > I suggest you divide fp patch to 2 parts. One is for > i386, the other for amd64. > > For now, just send i386 patch for review. And send > amd64 patch when > > prec support amd64. > > > > > > > > What do you think about my idea? >