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=1ebf4a4832cd821048ad1710957c9cfb2d15cd1c;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