Re: PATCH: Extend gdb remote protocol for AVX

H.J. Lu
2008-10-29T02:16:41Z

[-- Attachment #1: Type: text/plain, Size: 975 bytes --]

On Tue, Oct 28, 2008 at 9:26 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Tue, 28 Oct 2008 10:10:21 -0400
>> From: Daniel Jacobowitz <drow@false.org>
>>
>> On Mon, Oct 27, 2008 at 10:58:36PM -0700, H.J. Lu wrote:
>> > Are there any objections to my AVX patch?
>>
>> There were objections - just read the thread you are replying to. If
>> you have not changed the patch, then there are still objections.
>
> I also think it would be good to seperate out the changes to GDB's
> internal register file from the extensions you want to make to the

Here is the patch to extend gdb remote protocol for AVX.

> remote protocol. And I'd really like to see how an implementation of
> i387_supply_xsave() and i387_collect_xsave() would look in that
> context.

It is hard to implement them without an OS running on AVX
H/W. At this moment, we only need to define a remote protocol
for AVX. We can work on native AVX support when H/W is
available.

Thanks.

--
H.J.

[-- Attachment #2: gdb-avx-remote-1.patch --]
[-- Type: application/octet-stream, Size: 3575 bytes --]

2008-10-28 H.J. Lu <hongjiu.lu@intel.com>

* regformats/reg-i386-avx.dat: New.
* regformats/reg-i386-avx-linux.dat: Likewise.
* regformats/reg-x86-64-avx.dat: Likewise.
* regformats/reg-x86-64-avx-linux.dat: Likewise.

* regformats/reg-x86-64.dat: Add xmlarch.

Index: regformats/reg-x86-64-avx-linux.dat
===================================================================
--- regformats/reg-x86-64-avx-linux.dat (.../fsf/trunk/gdb) (revision 0)
+++ regformats/reg-x86-64-avx-linux.dat (.../branches/avx/gdb) (revision 3974)
@@ -0,0 +1,60 @@
+name:x86_64_avx_linux
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+256:ymm0
+256:ymm1
+256:ymm2
+256:ymm3
+256:ymm4
+256:ymm5
+256:ymm6
+256:ymm7
+256:ymm8
+256:ymm9
+256:ymm10
+256:ymm11
+256:ymm12
+256:ymm13
+256:ymm14
+256:ymm15
+32:mxcsr
+64:orig_rax
Index: regformats/reg-x86-64-avx.dat
===================================================================
--- regformats/reg-x86-64-avx.dat (.../fsf/trunk/gdb) (revision 0)
+++ regformats/reg-x86-64-avx.dat (.../branches/avx/gdb) (revision 3974)
@@ -0,0 +1,59 @@
+name:x86_64_avx
+expedite:rbp,rsp,rip
+64:rax
+64:rbx
+64:rcx
+64:rdx
+64:rsi
+64:rdi
+64:rbp
+64:rsp
+64:r8
+64:r9
+64:r10
+64:r11
+64:r12
+64:r13
+64:r14
+64:r15
+64:rip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+256:ymm0
+256:ymm1
+256:ymm2
+256:ymm3
+256:ymm4
+256:ymm5
+256:ymm6
+256:ymm7
+256:ymm8
+256:ymm9
+256:ymm10
+256:ymm11
+256:ymm12
+256:ymm13
+256:ymm14
+256:ymm15
+32:mxcsr
Index: regformats/reg-x86-64.dat
===================================================================
--- regformats/reg-x86-64.dat (.../fsf/trunk/gdb) (revision 3974)
+++ regformats/reg-x86-64.dat (.../branches/avx/gdb) (revision 3974)
@@ -1,4 +1,5 @@
name:x86_64
+xmlarch:i386:x86-64
expedite:rbp,rsp,rip
64:rax
64:rbx
Index: regformats/reg-i386-avx-linux.dat
===================================================================
--- regformats/reg-i386-avx-linux.dat (.../fsf/trunk/gdb) (revision 0)
+++ regformats/reg-i386-avx-linux.dat (.../branches/avx/gdb) (revision 3974)
@@ -0,0 +1,44 @@
+name:i386_avx_linux
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+256:ymm0
+256:ymm1
+256:ymm2
+256:ymm3
+256:ymm4
+256:ymm5
+256:ymm6
+256:ymm7
+32:mxcsr
+32:orig_eax
Index: regformats/reg-i386-avx.dat
===================================================================
--- regformats/reg-i386-avx.dat (.../fsf/trunk/gdb) (revision 0)
+++ regformats/reg-i386-avx.dat (.../branches/avx/gdb) (revision 3974)
@@ -0,0 +1,43 @@
+name:i386_avx
+expedite:ebp,esp,eip
+32:eax
+32:ecx
+32:edx
+32:ebx
+32:esp
+32:ebp
+32:esi
+32:edi
+32:eip
+32:eflags
+32:cs
+32:ss
+32:ds
+32:es
+32:fs
+32:gs
+80:st0
+80:st1
+80:st2
+80:st3
+80:st4
+80:st5
+80:st6
+80:st7
+32:fctrl
+32:fstat
+32:ftag
+32:fiseg
+32:fioff
+32:foseg
+32:fooff
+32:fop
+256:ymm0
+256:ymm1
+256:ymm2
+256:ymm3
+256:ymm4
+256:ymm5
+256:ymm6
+256:ymm7
+32:mxcsr