public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Simplify i386, amd64 and x32 expedite registers
@ 2016-10-04 10:41 Yao Qi
  2016-10-04 18:43 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2016-10-04 10:41 UTC (permalink / raw)
  To: gdb-patches

Nowadays, there are a lot of duplication about
i386/{i386, amd64, x32}*-expedite in features/Makefile.  However,
in features/Makefile, we have

 echo "expedite:$(if $($*-expedite),$($*-expedite),$($(firstword $(subst -, ,$(notdir $*)))-expedite))" \
	  >> $(outdir)/$*.tmp

which means for a given bar/foo-baz.xml, we'll look for either
bar/foo-baz-expedite or foo-expedite.  In x86 expedite registers, we
use the former now, but it will be much simpler if we use the latter.
This is what this patch does.  This patch removes them, and defines
three generic expedite.  Re-run 'make GDB=/path/build/gdb all' to
regenerate regformats/*.dat files, and they are not changed.

gdb:

2016-10-04  Yao Qi  <yao.qi@linaro.org>

	* features/Makefile: Remove i386/*-expedite. Add i386-expedite,
	amd64-expedite, and x32-expedite.
---
 gdb/features/Makefile | 31 +++----------------------------
 1 file changed, 3 insertions(+), 28 deletions(-)

diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index f24b13e..6282adf 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -79,34 +79,9 @@ WHICH = aarch64 \
 # Record which registers should be sent to GDB by default after stop.
 aarch64-expedite = x29,sp,pc
 arm-expedite = r11,sp,pc
-i386/i386-expedite = ebp,esp,eip
-i386/i386-linux-expedite = ebp,esp,eip
-i386/amd64-expedite = rbp,rsp,rip
-i386/amd64-linux-expedite = rbp,rsp,rip
-i386/i386-avx-expedite = ebp,esp,eip
-i386/i386-avx-linux-expedite = ebp,esp,eip
-i386/i386-mpx-expedite = ebp,esp,eip
-i386/i386-avx-mpx-expedite = ebp,esp,eip
-i386/i386-mpx-linux-expedite = ebp,esp,eip
-i386/i386-avx-mpx-linux-expedite = ebp,esp,eip
-i386/i386-avx512-expedite = ebp,esp,eip
-i386/i386-avx512-linux-expedite = ebp,esp,eip
-i386/i386-mmx-expedite = ebp,esp,eip
-i386/i386-mmx-linux-expedite = ebp,esp,eip
-i386/amd64-avx-expedite = rbp,rsp,rip
-i386/amd64-avx-linux-expedite = rbp,rsp,rip
-i386/amd64-mpx-expedite = rbp,rsp,rip
-i386/amd64-avx-mpx-expedite = rbp,rsp,rip
-i386/amd64-mpx-linux-expedite = rbp,rsp,rip
-i386/amd64-avx-mpx-linux-expedite = rbp,rsp,rip
-i386/amd64-avx512-expedite = rbp,rsp,rip
-i386/amd64-avx512-linux-expedite = rbp,rsp,rip
-i386/x32-expedite = rbp,rsp,rip
-i386/x32-linux-expedite = rbp,rsp,rip
-i386/x32-avx-expedite = rbp,rsp,rip
-i386/x32-avx-linux-expedite = rbp,rsp,rip
-i386/x32-avx512-expedite = rbp,rsp,rip
-i386/x32-avx512-linux-expedite = rbp,rsp,rip
+i386-expedite = ebp,esp,eip
+amd64-expedite = rbp,rsp,rip
+x32-expedite = rbp,rsp,rip
 mips-expedite = r29,pc
 mips-dsp-expedite = r29,pc
 mips64-expedite = r29,pc
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Simplify i386, amd64 and x32 expedite registers
  2016-10-04 10:41 [PATCH] Simplify i386, amd64 and x32 expedite registers Yao Qi
@ 2016-10-04 18:43 ` Pedro Alves
  2016-10-05  8:37   ` Yao Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2016-10-04 18:43 UTC (permalink / raw)
  To: Yao Qi, gdb-patches

On 10/04/2016 11:40 AM, Yao Qi wrote:
> Nowadays, there are a lot of duplication about
> i386/{i386, amd64, x32}*-expedite in features/Makefile.  However,
> in features/Makefile, we have
> 
>  echo "expedite:$(if $($*-expedite),$($*-expedite),$($(firstword $(subst -, ,$(notdir $*)))-expedite))" \
> 	  >> $(outdir)/$*.tmp
> 
> which means for a given bar/foo-baz.xml, we'll look for either
> bar/foo-baz-expedite or foo-expedite.  In x86 expedite registers, we
> use the former now, but it will be much simpler if we use the latter.
> This is what this patch does.  This patch removes them, and defines
> three generic expedite.  Re-run 'make GDB=/path/build/gdb all' to
> regenerate regformats/*.dat files, and they are not changed.
> 
> gdb:
> 
> 2016-10-04  Yao Qi  <yao.qi@linaro.org>
> 
> 	* features/Makefile: Remove i386/*-expedite. Add i386-expedite,
> 	amd64-expedite, and x32-expedite.

Wow, nice!  I had no idea.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Simplify i386, amd64 and x32 expedite registers
  2016-10-04 18:43 ` Pedro Alves
@ 2016-10-05  8:37   ` Yao Qi
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2016-10-05  8:37 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On Tue, Oct 4, 2016 at 7:43 PM, Pedro Alves <palves@redhat.com> wrote:
>
> Wow, nice!  I had no idea.
>

Patch is pushed in.

-- 
Yao (齐尧)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-05  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 10:41 [PATCH] Simplify i386, amd64 and x32 expedite registers Yao Qi
2016-10-04 18:43 ` Pedro Alves
2016-10-05  8:37   ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).