Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] ppc: Fix record of HTM instructions
@ 2016-08-18  0:04 Edjunior Barbosa Machado
  2016-08-18 12:49 ` Ulrich Weigand
  0 siblings, 1 reply; 3+ messages in thread
From: Edjunior Barbosa Machado @ 2016-08-18  0:04 UTC (permalink / raw)
  To: gdb-patches; +Cc: Edjunior Barbosa Machado, Ulrich Weigand

Hi,
the patch below fixes the record support of Hardware Transactional Memory
instructions on Power. It also solves a large number of unexpected failures
from gdb.reverse testcases sigall-precsave.exp and sigall-reverse.exp that
occur on distros which glibc uses HTM instructions. Ok?

Thanks,
--
Edjunior

gdb/ChangeLog
2016-08-17  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>

	* rs6000-tdep.c (ppc_process_record_op31): Handle HTM instructions.
---
 gdb/rs6000-tdep.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a616cbe..eb12c5d 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -4613,17 +4613,17 @@ ppc_process_record_op31 (struct gdbarch *gdbarch, struct regcache *regcache,
 
     case 654:		/* Transaction Begin */
     case 686:		/* Transaction End */
-    case 718:		/* Transaction Check */
     case 750:		/* Transaction Suspend or Resume */
     case 782:		/* Transaction Abort Word Conditional */
     case 814:		/* Transaction Abort Doubleword Conditional */
     case 846:		/* Transaction Abort Word Conditional Immediate */
     case 878:		/* Transaction Abort Doubleword Conditional Immediate */
     case 910:		/* Transaction Abort */
-      fprintf_unfiltered (gdb_stdlog, "Cannot record Transaction instructions. "
-			  "%08x at %s, 31-%d.\n",
-			  insn, paddress (gdbarch, addr), ext);
-      return -1;
+      record_full_arch_list_add_reg (regcache, tdep->ppc_ps_regnum);
+      /* FALL-THROUGH */
+    case 718:		/* Transaction Check */
+      record_full_arch_list_add_reg (regcache, tdep->ppc_cr_regnum);
+      return 0;
 
     case 1014:		/* Data Cache Block set to Zero */
       if (target_auxv_search (&current_target, AT_DCACHEBSIZE, &at_dcsz) <= 0
-- 
2.5.5


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

* Re: [PATCH] ppc: Fix record of HTM instructions
  2016-08-18  0:04 [PATCH] ppc: Fix record of HTM instructions Edjunior Barbosa Machado
@ 2016-08-18 12:49 ` Ulrich Weigand
  2016-08-18 14:21   ` Edjunior Barbosa Machado
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Weigand @ 2016-08-18 12:49 UTC (permalink / raw)
  To: Edjunior Barbosa Machado; +Cc: gdb-patches, Edjunior Barbosa Machado

Edjunior Barbosa Machado wrote:

> gdb/ChangeLog
> 2016-08-17  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
> 
> 	* rs6000-tdep.c (ppc_process_record_op31): Handle HTM instructions.

This is OK.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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

* Re: [PATCH] ppc: Fix record of HTM instructions
  2016-08-18 12:49 ` Ulrich Weigand
@ 2016-08-18 14:21   ` Edjunior Barbosa Machado
  0 siblings, 0 replies; 3+ messages in thread
From: Edjunior Barbosa Machado @ 2016-08-18 14:21 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gdb-patches, Joel Brobecker

On 08/18/2016 09:49 AM, Ulrich Weigand wrote:
> Edjunior Barbosa Machado wrote:
> 
>> gdb/ChangeLog
>> 2016-08-17  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
>>
>> 	* rs6000-tdep.c (ppc_process_record_op31): Handle HTM instructions.
> 
> This is OK.
> 
> Thanks,
> Ulrich
> 

Thanks Uli for your review. Pushed the fix to main and gdb-7.12-branch:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d44c67f38178c5ad0c083ebff6429d6e477ea42e
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1c9c56667193b56ad5fa30ac0ae731f1d63cd6c5

--
Edjunior


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

end of thread, other threads:[~2016-08-18 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-18  0:04 [PATCH] ppc: Fix record of HTM instructions Edjunior Barbosa Machado
2016-08-18 12:49 ` Ulrich Weigand
2016-08-18 14:21   ` Edjunior Barbosa Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox