|
|
6543d1 |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
6543d1 |
From: Keith Seitz <keiths@redhat.com>
|
|
|
6543d1 |
Date: Tue, 12 May 2020 15:38:27 -0400
|
|
|
6543d1 |
Subject: gdb-rhbz1659535-z15-record-replay.patch
|
|
|
6543d1 |
|
|
|
2376ec |
;; Backport z15 record/replay
|
|
|
2376ec |
;; Andreas Arnaz, RH BZ 1659535
|
|
|
2376ec |
|
|
|
6543d1 |
commit 6d9d6da48e84a65871a9d72fa785105d603990a6
|
|
|
6543d1 |
Author: Andreas Arnez <arnez@linux.ibm.com>
|
|
|
6543d1 |
Date: Wed Oct 9 11:09:22 2019 +0200
|
|
|
2376ec |
s390: Add record/replay support for arch13 instructions
|
|
|
2376ec |
|
|
|
2376ec |
Enable recording most of the new "arch13" instructions on z/Architecture
|
|
|
2376ec |
targets, except for the specialized-function-assist instructions:
|
|
|
2376ec |
|
|
|
2376ec |
SORTL - sort lists
|
|
|
2376ec |
DFLTCC - deflate conversion call
|
|
|
2376ec |
KDSA - compute digital signature authentication
|
|
|
2376ec |
|
|
|
2376ec |
gdb/ChangeLog:
|
|
|
2376ec |
|
|
|
2376ec |
* s390-tdep.c (390_process_record): Handle new arch13 instructions
|
|
|
2376ec |
except SORTL, DFLTCC, and KDSA.
|
|
|
2376ec |
|
|
|
2376ec |
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
|
|
|
2376ec |
--- a/gdb/s390-tdep.c
|
|
|
2376ec |
+++ b/gdb/s390-tdep.c
|
|
|
2376ec |
@@ -4101,6 +4101,7 @@ ex:
|
|
|
2376ec |
case 0xb998: /* ALCR - add logical with carry */
|
|
|
2376ec |
case 0xb999: /* SLBR - subtract logical with borrow */
|
|
|
2376ec |
case 0xb9f4: /* NRK - and */
|
|
|
2376ec |
+ case 0xb9f5: /* NCRK - and with complement */
|
|
|
2376ec |
case 0xb9f6: /* ORK - or */
|
|
|
2376ec |
case 0xb9f7: /* XRK - xor */
|
|
|
2376ec |
case 0xb9f8: /* ARK - add */
|
|
|
2376ec |
@@ -4133,20 +4134,32 @@ ex:
|
|
|
2376ec |
case 0xb919: /* SGFR - subtract */
|
|
|
2376ec |
case 0xb91a: /* ALGFR - add logical */
|
|
|
2376ec |
case 0xb91b: /* SLGFR - subtract logical */
|
|
|
2376ec |
+ case 0xb964: /* NNGRK - and 64 bit */
|
|
|
2376ec |
+ case 0xb965: /* OCGRK - or with complement 64 bit */
|
|
|
2376ec |
+ case 0xb966: /* NOGRK - or 64 bit */
|
|
|
2376ec |
+ case 0xb967: /* NXGRK - not exclusive or 64 bit */
|
|
|
2376ec |
+ case 0xb974: /* NNRK - and 32 bit */
|
|
|
2376ec |
+ case 0xb975: /* OCRK - or with complement 32 bit */
|
|
|
2376ec |
+ case 0xb976: /* NORK - or 32 bit */
|
|
|
2376ec |
+ case 0xb977: /* NXRK - not exclusive or 32 bit */
|
|
|
2376ec |
case 0xb980: /* NGR - and */
|
|
|
2376ec |
case 0xb981: /* OGR - or */
|
|
|
2376ec |
case 0xb982: /* XGR - xor */
|
|
|
2376ec |
case 0xb988: /* ALCGR - add logical with carry */
|
|
|
2376ec |
case 0xb989: /* SLBGR - subtract logical with borrow */
|
|
|
2376ec |
+ case 0xb9c0: /* SELFHR - select high */
|
|
|
2376ec |
case 0xb9e1: /* POPCNT - population count */
|
|
|
2376ec |
case 0xb9e4: /* NGRK - and */
|
|
|
2376ec |
+ case 0xb9e5: /* NCGRK - and with complement */
|
|
|
2376ec |
case 0xb9e6: /* OGRK - or */
|
|
|
2376ec |
case 0xb9e7: /* XGRK - xor */
|
|
|
2376ec |
case 0xb9e8: /* AGRK - add */
|
|
|
2376ec |
case 0xb9e9: /* SGRK - subtract */
|
|
|
2376ec |
case 0xb9ea: /* ALGRK - add logical */
|
|
|
2376ec |
+ case 0xb9e3: /* SELGR - select 64 bit */
|
|
|
2376ec |
case 0xb9eb: /* SLGRK - subtract logical */
|
|
|
2376ec |
case 0xb9ed: /* MSGRKC - multiply single 64x64 -> 64 */
|
|
|
2376ec |
+ case 0xb9f0: /* SELR - select 32 bit */
|
|
|
2376ec |
case 0xb9fd: /* MSRKC - multiply single 32x32 -> 32 */
|
|
|
2376ec |
/* 64-bit gpr destination + flags */
|
|
|
2376ec |
if (s390_record_gpr_g (gdbarch, regcache, inib[6]))
|
|
|
2376ec |
@@ -4522,7 +4535,13 @@ ex:
|
|
|
2376ec |
return -1;
|
|
|
2376ec |
break;
|
|
|
2376ec |
|
|
|
2376ec |
- /* 0xb932-0xb93b undefined */
|
|
|
2376ec |
+ /* 0xb932-0xb937 undefined */
|
|
|
2376ec |
+
|
|
|
2376ec |
+ /* 0xb938 unsupported: SORTL - sort lists */
|
|
|
2376ec |
+ /* 0xb939 unsupported: DFLTCC - deflate conversion call */
|
|
|
2376ec |
+ /* 0xb93a unsupported: KDSA - compute dig. signature auth. */
|
|
|
2376ec |
+
|
|
|
2376ec |
+ /* 0xb93b undefined */
|
|
|
2376ec |
|
|
|
2376ec |
case 0xb93c: /* PPNO - perform pseudorandom number operation [partial] */
|
|
|
2376ec |
regcache_raw_read_unsigned (regcache, S390_R1_REGNUM, &tmp);
|
|
|
2376ec |
@@ -5452,6 +5471,13 @@ ex:
|
|
|
2376ec |
/* 0xe3ce undefined */
|
|
|
2376ec |
/* 0xe3d0-0xe3ff undefined */
|
|
|
2376ec |
|
|
|
2376ec |
+ case 0xe601: /* VLEBRH - vector load byte reversed element */
|
|
|
2376ec |
+ case 0xe602: /* VLEBRG - vector load byte reversed element */
|
|
|
2376ec |
+ case 0xe603: /* VLEBRF - vector load byte reversed element */
|
|
|
2376ec |
+ case 0xe604: /* VLLEBRZ - vector load byte rev. el. and zero */
|
|
|
2376ec |
+ case 0xe605: /* VLBRREP - vector load byte rev. el. and replicate */
|
|
|
2376ec |
+ case 0xe606: /* VLBR - vector load byte reversed elements */
|
|
|
2376ec |
+ case 0xe607: /* VLER - vector load elements reversed */
|
|
|
2376ec |
case 0xe634: /* VPKZ - vector pack zoned */
|
|
|
2376ec |
case 0xe635: /* VLRL - vector load rightmost with immed. length */
|
|
|
2376ec |
case 0xe637: /* VLRLR - vector load rightmost with length */
|
|
|
2376ec |
@@ -5514,6 +5540,9 @@ ex:
|
|
|
2376ec |
case 0xe77f: /* VSRAB - vector shift right arithmetic by byte */
|
|
|
2376ec |
case 0xe784: /* VPDI - vector permute doubleword immediate */
|
|
|
2376ec |
case 0xe785: /* VBPERM - vector bit permute */
|
|
|
2376ec |
+ case 0xe786: /* VSLD - vector shift left double by bit */
|
|
|
2376ec |
+ case 0xe787: /* VSRD - vector shift right double by bit */
|
|
|
2376ec |
+ case 0xe78b: /* VSTRS - vector string search */
|
|
|
2376ec |
case 0xe78c: /* VPERM - vector permute */
|
|
|
2376ec |
case 0xe78d: /* VSEL - vector select */
|
|
|
2376ec |
case 0xe78e: /* VFMS - vector fp multiply and subtract */
|
|
|
2376ec |
@@ -5542,10 +5571,10 @@ ex:
|
|
|
2376ec |
case 0xe7bc: /* VGFMA - vector Galois field multiply sum and accumulate */
|
|
|
2376ec |
case 0xe7bd: /* VSBCBI - vector subtract with borrow compute borrow indication */
|
|
|
2376ec |
case 0xe7bf: /* VSBI - vector subtract with borrow indication */
|
|
|
2376ec |
- case 0xe7c0: /* VCLGD - vector convert to logical 64-bit */
|
|
|
2376ec |
- case 0xe7c1: /* VCDLG - vector convert from logical 64-bit */
|
|
|
2376ec |
- case 0xe7c2: /* VCGD - vector convert to fixed 64-bit */
|
|
|
2376ec |
- case 0xe7c3: /* VCDG - vector convert from fixed 64-bit */
|
|
|
2376ec |
+ case 0xe7c0: /* VCLFP - vector fp convert to logical */
|
|
|
2376ec |
+ case 0xe7c1: /* VCFPL - vector fp convert from logical */
|
|
|
2376ec |
+ case 0xe7c2: /* VCSFP - vector fp convert to fixed */
|
|
|
2376ec |
+ case 0xe7c3: /* VCFPS - vector fp convert from fixed */
|
|
|
2376ec |
case 0xe7c4: /* VLDE/VFLL - vector fp load lengthened */
|
|
|
2376ec |
case 0xe7c5: /* VLED/VFLR - vector fp load rounded */
|
|
|
2376ec |
case 0xe7c7: /* VFI - vector load fp integer */
|
|
|
2376ec |
@@ -5596,6 +5625,7 @@ ex:
|
|
|
2376ec |
return -1;
|
|
|
2376ec |
break;
|
|
|
2376ec |
|
|
|
2376ec |
+ case 0xe609: /* VSTEBRH - vector store byte reversed element */
|
|
|
2376ec |
case 0xe709: /* VSTEH - vector store element */
|
|
|
2376ec |
oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
|
|
|
2376ec |
if (record_full_arch_list_add_mem (oaddr, 2))
|
|
|
2376ec |
@@ -5604,6 +5634,7 @@ ex:
|
|
|
2376ec |
return -1;
|
|
|
2376ec |
break;
|
|
|
2376ec |
|
|
|
2376ec |
+ case 0xe60a: /* VSTEBRG - vector store byte reversed element */
|
|
|
2376ec |
case 0xe70a: /* VSTEG - vector store element */
|
|
|
2376ec |
oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
|
|
|
2376ec |
if (record_full_arch_list_add_mem (oaddr, 8))
|
|
|
2376ec |
@@ -5612,6 +5643,7 @@ ex:
|
|
|
2376ec |
return -1;
|
|
|
2376ec |
break;
|
|
|
2376ec |
|
|
|
2376ec |
+ case 0xe60b: /* VSTEBRF - vector store byte reversed element */
|
|
|
2376ec |
case 0xe70b: /* VSTEF - vector store element */
|
|
|
2376ec |
oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
|
|
|
2376ec |
if (record_full_arch_list_add_mem (oaddr, 4))
|
|
|
2376ec |
@@ -5622,6 +5654,8 @@ ex:
|
|
|
2376ec |
|
|
|
2376ec |
/* 0xe70c-0xe70d undefined */
|
|
|
2376ec |
|
|
|
2376ec |
+ case 0xe60e: /* VSTBR - vector store byte reversed elements */
|
|
|
2376ec |
+ case 0xe60f: /* VSTER - vector store elements reversed */
|
|
|
2376ec |
case 0xe70e: /* VST - vector store */
|
|
|
2376ec |
oaddr = s390_record_calc_disp (gdbarch, regcache, inib[3], insn[1], 0);
|
|
|
2376ec |
if (record_full_arch_list_add_mem (oaddr, 16))
|
|
|
2376ec |
@@ -6201,7 +6235,16 @@ ex:
|
|
|
2376ec |
/* SSE/SIL-format instruction */
|
|
|
2376ec |
switch (insn[0])
|
|
|
2376ec |
{
|
|
|
2376ec |
- /* 0xe500-0xe543 undefined, privileged, or unsupported */
|
|
|
2376ec |
+ /* 0xe500-0xe509 undefined, privileged, or unsupported */
|
|
|
2376ec |
+
|
|
|
2376ec |
+ case 0xe50a: /* MVCRL - move right to left */
|
|
|
2376ec |
+ regcache_raw_read_unsigned (regcache, S390_R0_REGNUM, &tmp);
|
|
|
2376ec |
+ oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
|
|
|
2376ec |
+ if (record_full_arch_list_add_mem (oaddr, (tmp & 0xff) + 1))
|
|
|
2376ec |
+ return -1;
|
|
|
2376ec |
+ break;
|
|
|
2376ec |
+
|
|
|
2376ec |
+ /* 0xe50b-0xe543 undefined, privileged, or unsupported */
|
|
|
2376ec |
|
|
|
2376ec |
case 0xe544: /* MVHHI - move */
|
|
|
2376ec |
oaddr = s390_record_calc_disp (gdbarch, regcache, 0, insn[1], 0);
|