From de35d97a8f17f7ff24e2201ef794b7ea748fc30e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 25 Sep 2018 23:06:01 +0100 Subject: [PATCH] skip id_reg.py parsing its own output; stop outputting "0" on empty --- id_regs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/id_regs.py b/id_regs.py index 1dd6cf4..5444355 100644 --- a/id_regs.py +++ b/id_regs.py @@ -26,6 +26,8 @@ def list_insns(): for fname in os.listdir(insns_dir): if not fname.endswith(".h"): continue + if fname.startswith("regs_"): + continue insn = fname[:-2] res.append((os.path.join(insns_dir, fname), insn)) return res @@ -49,8 +51,6 @@ def find_registers(fname): if p.startswith('WRITE_'): p = p[6:] res.append('#define USING_REG_%s' % p) - if len(res) == 0: - return "0" return '\n'.join(res) if __name__ == '__main__': -- 2.30.2