s390: Add .insn pseudo-mnemonics ril_a/b/c
History of instruction format RIL:
- RIL-b/c got initially introduced as RIL with IBM z900. [1, 2]
- RIL-a got introduced with IBM z9-109. [3, 4]
Note that the assembler does not evaluate or enforce the specified mode
and minimum architecture/CPU level for .insn pseudo-mnemonics.
While at it add test for non-standard RIL .insn pseudo-mnemonic rilu.
[1]: IBM z/Architecture Principles of Operation, SA22-7832-00, IBM z900,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr000.pdf
[2]: IBM z/Architecture Principles of Operation, SA22-7832-01,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr001.pdf
[3]: IBM z/Architecture Principles of Operation, SA22-7832-03,
https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr003.pdf
[4]: IBM z/Architecture Principles of Operation, SA22-7832-04, IBM z9,
https://publibfp.dhe.ibm.com/epubs/pdf/a2278324.pdf
opcodes/
* s390-opc.c (s390_opformats): Add pseudo-mnemonics ril_a,
ril_b, and ril_c.
gas/testsuite/
* gas/s390/zarch-operands.d: Add tests for .insn ril, rilu,
ril_a, ril_b, and ril_c.
* gas/s390/zarch-operands.s: Likewise.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
diff --git a/gas/testsuite/gas/s390/zarch-operands.d b/gas/testsuite/gas/s390/zarch-operands.d
index bca4a0b..8027d5c 100644
--- a/gas/testsuite/gas/s390/zarch-operands.d
+++ b/gas/testsuite/gas/s390/zarch-operands.d
@@ -43,8 +43,16 @@
.*: ec 12 03 04 05 54 [ ]*rnsbg %r1,%r2,3,4,5
# RIE-g
.*: ec 1f ff ff 00 42 [ ]*lochi %r1,-1,15
+# RIL
*([\da-f]+): c0 e5 00 00 00 00 [ ]*brasl %r14,\1 <foo\+0x\1>
.*: R_390_PC32DBL test_ril\+0x2
+.*: c2 19 00 00 00 01 [ ]*afi %r1,1
+# RIL-a
+.*: c2 19 ff ff ff ff [ ]*afi %r1,-1
+# RIL-b
+ *([\da-f]+): c0 e5 00 00 00 00 [ ]*brasl %r14,\1 <foo\+0x\1>
+# RIL-c
+ *([\da-f]+): c0 f4 00 00 00 00 [ ]*jg \1 <foo\+0x\1>
.*: eb 12 40 03 00 0d [ ]*sllg %r1,%r2,3\(%r4\)
.*: c8 50 20 01 40 03 [ ]*mvcos 1\(%r2\),3\(%r4\),%r5
#?.*: 07 07 [ ]*nopr %r7
diff --git a/gas/testsuite/gas/s390/zarch-operands.s b/gas/testsuite/gas/s390/zarch-operands.s
index 57ec87e..51e194c 100644
--- a/gas/testsuite/gas/s390/zarch-operands.s
+++ b/gas/testsuite/gas/s390/zarch-operands.s
@@ -16,6 +16,10 @@
.insn rie_e,0xec0000000044,%r1,.,%r3 # brxhg %r1,%r3,.
.insn rie_f,0xec0000000054,%r1,%r2,3,4,5 # rnsbg %r1,%r2,3,4,5
.insn rie_g,0xec0000000042,%r1,-1,15 # lochi %r1,-1,15
- .insn ril,0xc00500000000,%r14,test_ril
+ .insn ril,0xc00500000000,%r14,test_ril # brasl %r14,test_ril
+ .insn rilu,0xc20900000000,%r1,1 # afi %r1,1
+ .insn ril_a,0xc20900000000,%r1,-1 # afi %r1,-1
+ .insn ril_b,0xc00500000000,%r14,. # brasl %r14,.
+ .insn ril_c,0xc00400000000,0b1111,. # brcl 0b1111,.
.insn rse,0xeb000000000d,%r1,%r2,3(%r4)
.insn ssf,0xc80000000000,1(%r2),3(%r4),%r5
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
index 2c6405d..840f953 100644
--- a/opcodes/s390-opc.c
+++ b/opcodes/s390-opc.c
@@ -805,6 +805,9 @@
{ "rie_g",OP8(0x00LL), MASK_RIE_RUU0, INSTR_RIE_RUU0, 2, 9, 256, NULL },
{ "ril", OP8(0x00LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 2, 256, NULL },
{ "rilu", OP8(0x00LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 256, NULL },
+ { "ril_a",OP8(0x00LL), MASK_RIL_RU, INSTR_RIL_RU, 2, 4, 256, NULL },
+ { "ril_b",OP8(0x00LL), MASK_RIL_RP, INSTR_RIL_RP, 3, 2, 256, NULL },
+ { "ril_c",OP8(0x00LL), MASK_RIL_UP, INSTR_RIL_UP, 3, 2, 256, NULL },
{ "ris", OP8(0x00LL), MASK_RIS_RURDI, INSTR_RIS_RURDI, 2, 6, 256, NULL },
{ "rr", OP8(0x00LL), MASK_RR_RR, INSTR_RR_RR, 3, 0, 256, NULL },
{ "rre", OP8(0x00LL), MASK_RRE_RR, INSTR_RRE_RR, 3, 0, 256, NULL },