Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: GDB <gdb-patches@sourceware.org>
Subject: PATCH: Check is_amd64_regs_target to to set nr_regs
Date: Thu, 11 Oct 2012 15:25:00 -0000	[thread overview]
Message-ID: <20121011152456.GA14479@gmail.com> (raw)

Hi,

We should check is_amd64_regs_target instead of is_ilp32_target to set
nr_regs.  X32 is a amd64_regs target as well as ilp32 target.  OK to
install?

Thanks.

H.J.
---
2012-10-11  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.arch/i386-avx.exp: Check is_amd64_regs_target instead of
	is_ilp32_target to set nr_regs.
	* gdb.arch/i386-sse.exp: Likewise.

diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp
index 52a6e4a..32ba5b6 100644
--- a/gdb/testsuite/gdb.arch/i386-avx.exp
+++ b/gdb/testsuite/gdb.arch/i386-avx.exp
@@ -73,10 +73,10 @@ gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
          "set first breakpoint in main"
 gdb_continue_to_breakpoint "continue to first breakpoint in main"
 
-if [is_ilp32_target] {
-    set nr_regs 8
-} else {
+if [is_amd64_regs_target] {
     set nr_regs 16
+} else {
+    set nr_regs 8
 }
 
 for { set r 0 } { $r < $nr_regs } { incr r } {
diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp
index 896faf3..4132e0c 100644
--- a/gdb/testsuite/gdb.arch/i386-sse.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse.exp
@@ -73,10 +73,10 @@ gdb_test "break [gdb_get_line_number "first breakpoint here"]" \
          "set first breakpoint in main"
 gdb_continue_to_breakpoint "continue to first breakpoint in main"
 
-if [is_ilp32_target] {
-    set nr_regs 8
-} else {
+if [is_amd64_regs_target] {
     set nr_regs 16
+} else {
+    set nr_regs 8
 }
 
 for { set r 0 } { $r < $nr_regs } { incr r } {


             reply	other threads:[~2012-10-11 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 15:25 H.J. Lu [this message]
2012-10-11 17:16 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121011152456.GA14479@gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox