From 1ebf4a4832cd821048ad1710957c9cfb2d15cd1c Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Sun, 5 Nov 2023 18:15:03 -0800 Subject: [PATCH] detect duplicate instructions --- src/openpower/decoder/pseudo/pagereader.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2