From db92a4f5629ffbb5efff3741da340a7909c1ee83 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 26 Sep 2018 06:35:32 +0100 Subject: [PATCH] easier to #define USING_NOREGS if the opcode does not use any registers --- id_regs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/id_regs.py b/id_regs.py index 3f5290d..830ef95 100644 --- a/id_regs.py +++ b/id_regs.py @@ -58,6 +58,8 @@ def find_registers(fname): if p.startswith('WRITE_'): p = p[6:] res.append('#define USING_REG_%s' % p) + if not res: + return '#define USING_NOREGS' return '\n'.join(res) if __name__ == '__main__': -- 2.30.2