Blame SOURCES/gdb-rhbz2012819-ibmz-update-1of5.patch

4a80f0
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
4a80f0
From: Andreas Krebbel <krebbel@linux.ibm.com>
4a80f0
Date: Thu, 3 Dec 2020 16:31:15 +0100
4a80f0
Subject: gdb-rhbz2012819-ibmz-update-1of5.patch
4a80f0
4a80f0
;; IBM Z: Add support for HLASM extended mnemonics
4a80f0
;; (Andreas Krebbel, RHBZ 2012819)
4a80f0
4a80f0
Add extended mnemonics used in the HLASM assembler.  All of them are
4a80f0
just aliases for instructions we already support and help when
4a80f0
assembling code which was written for the HLASM assembler.
4a80f0
4a80f0
The HLASM mnemonics are documented here:
4a80f0
https://www.ibm.com/support/knowledgecenter/SSENW6_1.6.0/com.ibm.hlasm.v1r6.asm/asmr1023.pdf
4a80f0
4a80f0
See the 'Branching with extended mnemonic codes' chapter.
4a80f0
4a80f0
objdump will still print the existing mnemonics with the exception of
4a80f0
relative nop branches (i.e. conditional branches with an empty
4a80f0
condition code mask).  Now we have jnop and jgnop which will be used
4a80f0
by objdump when possible.
4a80f0
4a80f0
The same change have been applied to the LLVM assembler:
4a80f0
https://reviews.llvm.org/D92185
4a80f0
4a80f0
opcodes/
4a80f0
4a80f0
	* s390-opc.txt: Add extended mnemonics.
4a80f0
4a80f0
gas/
4a80f0
4a80f0
	* testsuite/gas/s390/esa-g5.s: Test new extended mnemonics.
4a80f0
	* testsuite/gas/s390/esa-g5.d: Likewise.
4a80f0
	* testsuite/gas/s390/esa-z900.s: Likewise.
4a80f0
	* testsuite/gas/s390/esa-z900.d: Likewise.
4a80f0
	* testsuite/gas/s390/zarch-z900.s: Likewise.
4a80f0
	* testsuite/gas/s390/zarch-z900.d: Likewise.
4a80f0
4a80f0
ld/
4a80f0
4a80f0
	* testsuite/ld-s390/tlsbin_64.dd: The newly added jgnop mnemonic
4a80f0
	replaces long relative branches with empty condition code mask.
4a80f0
4a80f0
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
4a80f0
--- a/opcodes/s390-opc.txt
4a80f0
+++ b/opcodes/s390-opc.txt
4a80f0
@@ -246,10 +246,14 @@ d7 xc SS_L0RDRD "exclusive OR" g5 esa,zarch
4a80f0
 f8 zap SS_LLRDRD "zero and add" g5 esa,zarch
4a80f0
 a70a ahi RI_RI "add halfword immediate" g5 esa,zarch
4a80f0
 84 brxh RSI_RRP "branch relative on index high" g5 esa,zarch
4a80f0
+84 jxh RSI_RRP "branch relative on index high" g5 esa,zarch
4a80f0
 85 brxle RSI_RRP "branch relative on index low or equal" g5 esa,zarch
4a80f0
+85 jxle RSI_RRP "branch relative on index low or equal" g5 esa,zarch
4a80f0
 a705 bras RI_RP "branch relative and save" g5 esa,zarch
4a80f0
+a705 jas RI_RP "branch relative and save" g5 esa,zarch
4a80f0
 a704 brc RI_UP "branch relative on condition" g5 esa,zarch
4a80f0
 a706 brct RI_RP "branch relative on count" g5 esa,zarch
4a80f0
+a706 jct RI_RP "branch relative on count" g5 esa,zarch
4a80f0
 b241 cksm RRE_RR "checksum" g5 esa,zarch
4a80f0
 a70e chi RI_RI "compare halfword immediate" g5 esa,zarch
4a80f0
 a9 clcle RS_RRRD "compare logical long extended" g5 esa,zarch
4a80f0
@@ -268,8 +272,11 @@ a701 tml RI_RU "test under mask low" g5 esa,zarch
4a80f0
 4700 nop RX_0RRD "no operation" g5 esa,zarch optparm
4a80f0
 4700 b*8 RX_0RRD "conditional branch" g5 esa,zarch
4a80f0
 47f0 b RX_0RRD "unconditional branch" g5 esa,zarch
4a80f0
+a704 jnop RI_0P "nop jump" g5 esa,zarch
4a80f0
 a704 j*8 RI_0P "conditional jump" g5 esa,zarch
4a80f0
+a704 br*8 RI_0P "conditional jump" g5 esa,zarch
4a80f0
 a7f4 j RI_0P "unconditional jump" g5 esa,zarch
4a80f0
+a7f4 bru RI_0P "unconditional jump" g5 esa,zarch
4a80f0
 b34a axbr RRE_FEFE "add extended bfp" g5 esa,zarch
4a80f0
 b31a adbr RRE_FF "add long bfp" g5 esa,zarch
4a80f0
 ed000000001a adb RXE_FRRD "add long bfp" g5 esa,zarch
4a80f0
@@ -437,7 +444,9 @@ e3000000001b slgf RXE_RRRD "subtract logical 64<32" z900 zarch
4a80f0
 e3000000000c msg RXE_RRRD "multiply single 64" z900 zarch
4a80f0
 e3000000001c msgf RXE_RRRD "multiply single 64<32" z900 zarch
4a80f0
 ec0000000044 brxhg RIE_RRP "branch relative on index high 64" z900 zarch
4a80f0
+ec0000000044 jxhg RIE_RRP "branch relative on index high 64" z900 zarch
4a80f0
 ec0000000045 brxlg RIE_RRP "branch relative on index low or equal 64" z900 zarch
4a80f0
+ec0000000045 jxleg RIE_RRP "branch relative on index low or equal 64" z900 zarch
4a80f0
 eb0000000044 bxhg RSE_RRRD "branch on index high 64" z900 zarch
4a80f0
 eb0000000045 bxleg RSE_RRRD "branch on index low or equal 64" z900 zarch
4a80f0
 eb000000000c srlg RSE_RRRD "shift right single logical 64" z900 zarch
4a80f0
@@ -462,10 +471,15 @@ eb0000000080 icmh RSE_RURD "insert characters under mask high" z900 zarch
4a80f0
 a702 tmhh RI_RU "test under mask high high" z900 zarch
4a80f0
 a703 tmhl RI_RU "test under mask high low" z900 zarch
4a80f0
 c004 brcl RIL_UP "branch relative on condition long" z900 esa,zarch
4a80f0
+c004 jgnop RIL_0P "nop jump long" z900 esa,zarch
4a80f0
 c004 jg*8 RIL_0P "conditional jump long" z900 esa,zarch
4a80f0
+c004 br*8l RIL_0P "conditional jump long" z900 esa,zarch
4a80f0
 c0f4 jg RIL_0P "unconditional jump long" z900 esa,zarch
4a80f0
+c0f4 brul RIL_0P "unconditional jump long" z900 esa,zarch
4a80f0
 c005 brasl RIL_RP "branch relative and save long" z900 esa,zarch
4a80f0
+c005 jasl RIL_RP "branch relative and save long" z900 esa,zarch
4a80f0
 a707 brctg RI_RP "branch relative on count 64" z900 zarch
4a80f0
+a707 jctg RI_RP "branch relative on count 64" z900 zarch
4a80f0
 a709 lghi RI_RI "load halfword immediate 64" z900 zarch
4a80f0
 a70b aghi RI_RI "add halfword immediate 64" z900 zarch
4a80f0
 a70d mghi RI_RI "multiply halfword immediate 64" z900 zarch