POWER10: Add Return-Oriented Programming instructions
authorPeter Bergner <bergner@linux.ibm.com>
Fri, 8 Jan 2021 22:07:12 +0000 (16:07 -0600)
committerAlan Modra <amodra@gmail.com>
Sat, 9 Jan 2021 04:46:13 +0000 (15:16 +1030)
commitaae7fcb8d755a2eb3f32a3f945a4e8f30cf5c5e2
tree42165a09c958a6884c90a9126b87c3c9b3b4358a
parent6430704567c6c3f838ad7d01d5dfcf3fcb8d6b24
POWER10: Add Return-Oriented Programming instructions

POWER10 adds some return-oriented programming (ROP) instructions and
this patch adds support for them.  You will notice that they are enabled
for POWER8 and later, not just POWER10 and later.  This is on purpose.
This allows the instructions to be added to POWER8 binaries that can be
run on POWER8, POWER9 and POWER10 cpus.  On POWER8 and POWER9, these
instructions just act as nop's.

opcodes/
* ppc-opc.c (insert_dw, (extract_dw): New functions.
(DW, (XRC_MASK): Define.
(powerpc_opcodes) <hashchk, hashchkp, hashst, haststp>: New mnemonics.
gas/
* testsuite/gas/ppc/rop-checks.d,
* testsuite/gas/ppc/rop-checks.l,
* testsuite/gas/ppc/rop-checks.s,
* testsuite/gas/ppc/rop.d,
* testsuite/gas/ppc/rop.s: New tests.
* testsuite/gas/ppc/ppc.exp: Run them.
gas/ChangeLog
gas/testsuite/gas/ppc/ppc.exp
gas/testsuite/gas/ppc/rop-checks.d [new file with mode: 0644]
gas/testsuite/gas/ppc/rop-checks.l [new file with mode: 0644]
gas/testsuite/gas/ppc/rop-checks.s [new file with mode: 0644]
gas/testsuite/gas/ppc/rop.d [new file with mode: 0644]
gas/testsuite/gas/ppc/rop.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/ppc-opc.c