* Re: MMX and floating point insn suport for reversible debugging
@ 2009-05-10 6:37 paawan oza
2009-05-10 8:39 ` Mark Kettenis
0 siblings, 1 reply; 7+ messages in thread
From: paawan oza @ 2009-05-10 6:37 UTC (permalink / raw)
To: Hui Zhu
Cc: Thiago Jung Bauermann, gdb ml, Pedro Alves, Marc Khouzam,
Michael Snyder, Eli Zaretskii, Mark Kettenis
Hi Hui,
I think we need to update and add floating point in following structure
for st1 to st7.
enum i386_regnum
{
I386_EAX_REGNUM, /* %eax */
I386_ECX_REGNUM, /* %ecx */
I386_EDX_REGNUM, /* %edx */
I386_EBX_REGNUM, /* %ebx */
I386_ESP_REGNUM, /* %esp */
I386_EBP_REGNUM, /* %ebp */
I386_ESI_REGNUM, /* %esi */
I386_EDI_REGNUM, /* %edi */
I386_EIP_REGNUM, /* %eip */
I386_EFLAGS_REGNUM, /* %eflags */
I386_CS_REGNUM, /* %cs */
I386_SS_REGNUM, /* %ss */
I386_DS_REGNUM, /* %ds */
I386_ES_REGNUM, /* %es */
I386_FS_REGNUM, /* %fs */
I386_GS_REGNUM, /* %gs */
I386_ST0_REGNUM /* %st(0) */
};
what do you say ?
Regards,
Oza.
--- On Thu, 5/7/09, Hui Zhu <teawater@gmail.com> wrote:
> From: Hui Zhu <teawater@gmail.com>
> Subject: Re: MMX and floating point insn suport for reversible debugging
> To: "paawan oza" <paawan1982@yahoo.com>
> Cc: "Thiago Jung Bauermann" <bauerman@br.ibm.com>, "gdb ml" <gdb@sourceware.org>, "Pedro Alves" <pedro@codesourcery.com>, "Marc Khouzam" <marc.khouzam@ericsson.com>, "Michael Snyder" <msnyder@vmware.com>, "Eli Zaretskii" <eliz@gnu.org>, "Mark Kettenis" <mark.kettenis@xs4all.nl>
> Date: Thursday, May 7, 2009, 8:24 AM
> On Thu, May 7, 2009 at 02:02, paawan
> oza <paawan1982@yahoo.com>
> wrote:
> >
> > Hi Hui,
> >
> > I have started understanding and working on point-1.
> > I have some questions. please let me know my
> understanding is correct ?
> >
> > 1) i386-tdep.c is the one which has been done for
> record-replay. which basically takes care of disassembling
> insns...
> > but I see some code regarding MMX and x87FPU already
> available.
> > may I know exactly, what support is missing ?
> >
>
> case 0x0f06:
> break;
>
> /* MMX/SSE/SSE2/PNI support */
> /* XXX */
>
> default:
>
> Your mean is this part?
>
>
> And I suggest you can begin with float point insn
> first. It doesn't
> record float point reg change.
>
>
> Thanks,
> Hui
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: MMX and floating point insn suport for reversible debugging
2009-05-10 6:37 MMX and floating point insn suport for reversible debugging paawan oza
@ 2009-05-10 8:39 ` Mark Kettenis
0 siblings, 0 replies; 7+ messages in thread
From: Mark Kettenis @ 2009-05-10 8:39 UTC (permalink / raw)
To: paawan1982
Cc: teawater, bauerman, gdb, pedro, marc.khouzam, msnyder, eliz,
mark.kettenis
> Date: Sat, 9 May 2009 23:37:20 -0700 (PDT)
> From: paawan oza <paawan1982@yahoo.com>
>
> Hi Hui,
>
> I think we need to update and add floating point in following structure
> for st1 to st7.
>
> enum i386_regnum
> {
> I386_EAX_REGNUM, /* %eax */
> I386_ECX_REGNUM, /* %ecx */
> I386_EDX_REGNUM, /* %edx */
> I386_EBX_REGNUM, /* %ebx */
> I386_ESP_REGNUM, /* %esp */
> I386_EBP_REGNUM, /* %ebp */
> I386_ESI_REGNUM, /* %esi */
> I386_EDI_REGNUM, /* %edi */
> I386_EIP_REGNUM, /* %eip */
> I386_EFLAGS_REGNUM, /* %eflags */
> I386_CS_REGNUM, /* %cs */
> I386_SS_REGNUM, /* %ss */
> I386_DS_REGNUM, /* %ds */
> I386_ES_REGNUM, /* %es */
> I386_FS_REGNUM, /* %fs */
> I386_GS_REGNUM, /* %gs */
> I386_ST0_REGNUM /* %st(0) */
> };
>
> what do you say ?
I don't think that should be necessary.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MMX and floating point insn suport for reversible debugging
@ 2009-05-10 13:45 paawan oza
0 siblings, 0 replies; 7+ messages in thread
From: paawan oza @ 2009-05-10 13:45 UTC (permalink / raw)
To: Hui Zhu
Cc: Thiago Jung Bauermann, gdb ml, Pedro Alves, Marc Khouzam,
Michael Snyder, Eli Zaretskii, Mark Kettenis
Hi Hui,
dont we need to save FPU flags also, while saving floating point registers?
for e.g. instruction
FMUL/FMULP/FIMUL—Multiply ; aafter the result,
FPU flags may get affected
as follows.
FPU Flags Affected
C1 Set to 0 if stack underflow occurred.
Set if result was rounded up; cleared otherwise.
C0, C2, C3 Undefined.
what is you opinion ?
Regards,
Oza.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: MMX and floating point insn suport for reversible debugging
@ 2009-05-10 6:40 paawan oza
0 siblings, 0 replies; 7+ messages in thread
From: paawan oza @ 2009-05-10 6:40 UTC (permalink / raw)
To: Hui Zhu
Cc: Thiago Jung Bauermann, gdb ml, Pedro Alves, Marc Khouzam,
Michael Snyder, Eli Zaretskii, Mark Kettenis
I think,
record_arch_list_add_reg (ir.regcache, I386_ST0_REGNUM) will be sufficient
to fetch all floating point registers.
no need to update the structure.
Regards,
Oza.
--- On Sun, 5/10/09, paawan oza <paawan1982@yahoo.com> wrote:
> From: paawan oza <paawan1982@yahoo.com>
> Subject: Re: MMX and floating point insn suport for reversible debugging
> To: "Hui Zhu" <teawater@gmail.com>
> Cc: "Thiago Jung Bauermann" <bauerman@br.ibm.com>, "gdb ml" <gdb@sourceware.org>, "Pedro Alves" <pedro@codesourcery.com>, "Marc Khouzam" <marc.khouzam@ericsson.com>, "Michael Snyder" <msnyder@vmware.com>, "Eli Zaretskii" <eliz@gnu.org>, "Mark Kettenis" <mark.kettenis@xs4all.nl>
> Date: Sunday, May 10, 2009, 12:07 PM
>
> Hi Hui,
>
> I think we need to update and add floating point in
> following structure
> for st1 to st7.
>
> enum i386_regnum
> {
> I386_EAX_REGNUM,
> /* %eax */
> I386_ECX_REGNUM,
> /* %ecx */
> I386_EDX_REGNUM,
> /* %edx */
> I386_EBX_REGNUM,
> /* %ebx */
> I386_ESP_REGNUM,
> /* %esp */
> I386_EBP_REGNUM,
> /* %ebp */
> I386_ESI_REGNUM,
> /* %esi */
> I386_EDI_REGNUM,
> /* %edi */
> I386_EIP_REGNUM,
> /* %eip */
> I386_EFLAGS_REGNUM,
> /* %eflags */
> I386_CS_REGNUM,
> /* %cs */
> I386_SS_REGNUM,
> /* %ss */
> I386_DS_REGNUM,
> /* %ds */
> I386_ES_REGNUM,
> /* %es */
> I386_FS_REGNUM,
> /* %fs */
> I386_GS_REGNUM,
> /* %gs */
> I386_ST0_REGNUM
> /* %st(0) */
> };
>
> what do you say ?
>
>
> Regards,
> Oza.
>
> --- On Thu, 5/7/09, Hui Zhu <teawater@gmail.com>
> wrote:
>
> > From: Hui Zhu <teawater@gmail.com>
> > Subject: Re: MMX and floating point insn suport for
> reversible debugging
> > To: "paawan oza" <paawan1982@yahoo.com>
> > Cc: "Thiago Jung Bauermann" <bauerman@br.ibm.com>,
> "gdb ml" <gdb@sourceware.org>,
> "Pedro Alves" <pedro@codesourcery.com>,
> "Marc Khouzam" <marc.khouzam@ericsson.com>,
> "Michael Snyder" <msnyder@vmware.com>,
> "Eli Zaretskii" <eliz@gnu.org>,
> "Mark Kettenis" <mark.kettenis@xs4all.nl>
> > Date: Thursday, May 7, 2009, 8:24 AM
> > On Thu, May 7, 2009 at 02:02, paawan
> > oza <paawan1982@yahoo.com>
> > wrote:
> > >
> > > Hi Hui,
> > >
> > > I have started understanding and working on
> point-1.
> > > I have some questions. please let me know my
> > understanding is correct ?
> > >
> > > 1) i386-tdep.c is the one which has been done
> for
> > record-replay. which basically takes care of
> disassembling
> > insns...
> > > but I see some code regarding MMX and x87FPU
> already
> > available.
> > > may I know exactly, what support is missing ?
> > >
> >
> > case 0x0f06:
> > break;
> >
> > /* MMX/SSE/SSE2/PNI support */
> > /* XXX */
> >
> > default:
> >
> > Your mean is this part?
> >
> >
> > And I suggest you can begin with float point insn
> > first. It doesn't
> > record float point reg change.
> >
> >
> > Thanks,
> > Hui
> >
>
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: MMX and floating point insn suport for reversible debugging
@ 2009-05-09 14:45 paawan oza
0 siblings, 0 replies; 7+ messages in thread
From: paawan oza @ 2009-05-09 14:45 UTC (permalink / raw)
To: Hui Zhu
Cc: Thiago Jung Bauermann, gdb ml, Pedro Alves, Marc Khouzam,
Michael Snyder, Eli Zaretskii, Mark Kettenis
Hi,
yes.
I guess, MMX support needs to be added here,
case 0x0f06:
break;
/* MMX/SSE/SSE2/PNI support */
/* XXX */
but before I would start adding floating point support.
I have 2 doubts:
-> in function record_arch_list_add_reg
we are doing:
rec->u.reg.val = (gdb_byte *) xmalloc (MAX_REGISTER_SIZE);
we are allocating 128 bytes.....
but I suppose only SSE extensions can fully utilize the memory...
for rest of the registers, are not we allocating more memory than required for record ?
-> SSE support is not there in linux krenel (ptrace), I also read in some piece of comments also.
but SSE support (PT_GETXMMREGS) is suported in openbsd.
with that sense do we need to add SSE/SSE2/SSE3/SSE4
support in i386-tdep.c generically ? (of coursse our first priority is to add floating point suport, but I am querying out of my curiousity)
Regards,
Oza.
--- On Thu, 5/7/09, Hui Zhu <teawater@gmail.com> wrote:
> From: Hui Zhu <teawater@gmail.com>
> Subject: Re: MMX and floating point insn suport for reversible debugging
> To: "paawan oza" <paawan1982@yahoo.com>
> Cc: "Thiago Jung Bauermann" <bauerman@br.ibm.com>, "gdb ml" <gdb@sourceware.org>, "Pedro Alves" <pedro@codesourcery.com>, "Marc Khouzam" <marc.khouzam@ericsson.com>, "Michael Snyder" <msnyder@vmware.com>, "Eli Zaretskii" <eliz@gnu.org>, "Mark Kettenis" <mark.kettenis@xs4all.nl>
> Date: Thursday, May 7, 2009, 8:24 AM
> On Thu, May 7, 2009 at 02:02, paawan
> oza <paawan1982@yahoo.com>
> wrote:
> >
> > Hi Hui,
> >
> > I have started understanding and working on point-1.
> > I have some questions. please let me know my
> understanding is correct ?
> >
> > 1) i386-tdep.c is the one which has been done for
> record-replay. which basically takes care of disassembling
> insns...
> > but I see some code regarding MMX and x87FPU already
> available.
> > may I know exactly, what support is missing ?
> >
>
> case 0x0f06:
> break;
>
> /* MMX/SSE/SSE2/PNI support */
> /* XXX */
>
> default:
>
> Your mean is this part?
>
>
> And I suggest you can begin with float point insn
> first. It doesn't
> record float point reg change.
>
>
> Thanks,
> Hui
>
^ permalink raw reply [flat|nested] 7+ messages in thread* MMX and floating point insn suport for reversible debugging
@ 2009-05-06 18:02 paawan oza
2009-05-07 2:54 ` Hui Zhu
0 siblings, 1 reply; 7+ messages in thread
From: paawan oza @ 2009-05-06 18:02 UTC (permalink / raw)
To: Thiago Jung Bauermann, Hui Zhu
Cc: gdb ml, Pedro Alves, Marc Khouzam, Michael Snyder, Eli Zaretskii,
Mark Kettenis
Hi Hui,
I have started understanding and working on point-1.
I have some questions. please let me know my understanding is correct ?
1) i386-tdep.c is the one which has been done for record-replay. which basically takes care of disassembling insns...
but I see some code regarding MMX and x87FPU already available.
may I know exactly, what support is missing ?
2) I also see SSE XMM0-XMM7 register stuufs in teh code too.
we need to support XMM (SSE) or it is already done.
please clarify above two points. please clarify to what support is missing and what is expected ?
Anyway, I am going through i386-tdep.c thoroughly to understand it fully.
Regards,
Oza.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: MMX and floating point insn suport for reversible debugging
2009-05-06 18:02 paawan oza
@ 2009-05-07 2:54 ` Hui Zhu
0 siblings, 0 replies; 7+ messages in thread
From: Hui Zhu @ 2009-05-07 2:54 UTC (permalink / raw)
To: paawan oza
Cc: Thiago Jung Bauermann, gdb ml, Pedro Alves, Marc Khouzam,
Michael Snyder, Eli Zaretskii, Mark Kettenis
On Thu, May 7, 2009 at 02:02, paawan oza <paawan1982@yahoo.com> wrote:
>
> Hi Hui,
>
> I have started understanding and working on point-1.
> I have some questions. please let me know my understanding is correct ?
>
> 1) i386-tdep.c is the one which has been done for record-replay. which basically takes care of disassembling insns...
> but I see some code regarding MMX and x87FPU already available.
> may I know exactly, what support is missing ?
>
case 0x0f06:
break;
/* MMX/SSE/SSE2/PNI support */
/* XXX */
default:
Your mean is this part?
And I suggest you can begin with float point insn first. It doesn't
record float point reg change.
Thanks,
Hui
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-05-10 13:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-10 6:37 MMX and floating point insn suport for reversible debugging paawan oza
2009-05-10 8:39 ` Mark Kettenis
-- strict thread matches above, loose matches on Subject: below --
2009-05-10 13:45 paawan oza
2009-05-10 6:40 paawan oza
2009-05-09 14:45 paawan oza
2009-05-06 18:02 paawan oza
2009-05-07 2:54 ` Hui Zhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox