From: Jacob Lifshay Date: Mon, 6 Nov 2023 02:15:03 +0000 (-0800) Subject: detect duplicate instructions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c35231597f4400787c504373e58c24fa439196d;p=openpower-isa.git detect duplicate instructions --- diff --git a/src/openpower/decoder/pseudo/pagereader.py b/src/openpower/decoder/pseudo/pagereader.py index e0c6cf20..736034f4 100644 --- a/src/openpower/decoder/pseudo/pagereader.py +++ b/src/openpower/decoder/pseudo/pagereader.py @@ -359,6 +359,9 @@ class ISA: op = copy(d) op['regs'] = regs op['opcode'] = opcode + if opcode in self.instr: + raise IOError("Duplicate instruction: %s\nin both %s and %s" % ( + opcode, self.instr[opcode].page, op['page'])) self.instr[opcode] = Ops(**op) # create list of instructions by form