From: Luke Kenneth Casson Leighton Date: Tue, 25 Sep 2018 22:06:01 +0000 (+0100) Subject: skip id_reg.py parsing its own output; stop outputting "0" on empty X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de35d97a8f17f7ff24e2201ef794b7ea748fc30e;p=riscv-isa-sim.git skip id_reg.py parsing its own output; stop outputting "0" on empty --- 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__':