From 33ce50302388c16b57f8cda347a8ae436c97cc8f Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sat, 14 May 2022 10:47:11 +0000 Subject: [PATCH] ppc: introduce flag for draft opcodes --- include/opcode/ppc.h | 3 +++ opcodes/ppc-dis.c | 6 ++++++ opcodes/ppc-opc.c | 1 + 3 files changed, 10 insertions(+) diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h index a9c25298311..d81ab10a3ca 100644 --- a/include/opcode/ppc.h +++ b/include/opcode/ppc.h @@ -231,6 +231,9 @@ extern const unsigned int spe2_num_opcodes; /* Opcode is only supported by power10 architecture. */ #define PPC_OPCODE_POWER10 0x400000000000ull +/* Opcode is experimental; not yet approved by OpenPOWER Foundation. */ +#define PPC_OPCODE_DRAFT 0x800000000000ull + /* A macro to extract the major opcode from an instruction. */ #define PPC_OP(i) (((i) >> 26) & 0x3f) diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c index 38ddeca2623..169be1e15da 100644 --- a/opcodes/ppc-dis.c +++ b/opcodes/ppc-dis.c @@ -205,6 +205,12 @@ struct ppc_mopt ppc_opts[] = { | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX), 0 }, + { "draft", (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64 + | PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 + | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 + | PPC_OPCODE_POWER10 | PPC_OPCODE_ALTIVEC | PPC_OPCODE_VSX + | PPC_OPCODE_DRAFT), + 0 }, { "ppc", PPC_OPCODE_PPC, 0 }, { "ppc32", PPC_OPCODE_PPC, diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c index bd83d44a2ae..7d19af760e7 100644 --- a/opcodes/ppc-opc.c +++ b/opcodes/ppc-opc.c @@ -4767,6 +4767,7 @@ const unsigned int num_powerpc_operands = (sizeof (powerpc_operands) #define POWER8 PPC_OPCODE_POWER8 #define POWER9 PPC_OPCODE_POWER9 #define POWER10 PPC_OPCODE_POWER10 +#define DRAFT PPC_OPCODE_DRAFT #define CELL PPC_OPCODE_CELL #define PPC64 PPC_OPCODE_64 | PPC_OPCODE_64_BRIDGE #define NON32 (PPC_OPCODE_64 | PPC_OPCODE_POWER4 \ -- 2.30.2