diff options
author | Florian Zaruba <florian@zaruba.email> | 2022-08-28 22:28:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-28 13:28:16 -0700 |
commit | 86edbf4ff2d3bcf88a189f8729eb1d751e2ccfb2 (patch) | |
tree | f6ecc1279f11151dcea0a60cbb1df673cbfb0d60 | |
parent | dcdf8d35dc906b6232b1e3d01d1392128e049294 (diff) | |
download | riscv-opcodes-86edbf4ff2d3bcf88a189f8729eb1d751e2ccfb2.zip riscv-opcodes-86edbf4ff2d3bcf88a189f8729eb1d751e2ccfb2.tar.gz riscv-opcodes-86edbf4ff2d3bcf88a189f8729eb1d751e2ccfb2.tar.bz2 |
Make path to encoding.h relative to script (#141)
That allows for running the script out-of-tree.
Signed-off-by: Florian Zaruba <florian@zaruba.email>
Signed-off-by: Florian Zaruba <florian@zaruba.email>
-rwxr-xr-x | parse.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -846,7 +846,7 @@ def make_c(instr_dict): mask = ((1 << (end - begin + 1)) - 1) << begin arg_str += f"#define INSN_FIELD_{name.upper().replace(' ', '_')} {hex(mask)}\n" - with open('encoding.h', 'r') as file: + with open(f'{os.path.dirname(__file__)}/encoding.h', 'r') as file: enc_header = file.read() commit = os.popen('git log -1 --format="format:%h"').read() |