aboutsummaryrefslogtreecommitdiff
path: root/parse.py
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2022-07-22 22:21:54 +0200
committerGitHub <noreply@github.com>2022-07-22 13:21:54 -0700
commit8ab2df7431d19d2942ec2a3b8386dfefe0620c88 (patch)
treeaa19a4b6b945a01461c54306d8c1f38d837862fb /parse.py
parent700831378b7fbddc3bcc6b5052541cc4dc2d4ca1 (diff)
downloadriscv-opcodes-8ab2df7431d19d2942ec2a3b8386dfefe0620c88.zip
riscv-opcodes-8ab2df7431d19d2942ec2a3b8386dfefe0620c88.tar.gz
riscv-opcodes-8ab2df7431d19d2942ec2a3b8386dfefe0620c88.tar.bz2
Move the SPDX tag to the first line (#137)
Linux kernel coding style requires the SPDX tag to be placed in the very first line of the generated file. See kernel file Documentation/process/license-rules.rst at chapter 'License identifier syntax', '1. Placement:'. Move the SPDX tag in the python script. While there, adjust also the style of the multi-line comment. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'parse.py')
-rwxr-xr-xparse.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/parse.py b/parse.py
index 2de8fbc..c389eb8 100755
--- a/parse.py
+++ b/parse.py
@@ -823,11 +823,13 @@ def make_c(instr_dict):
commit = os.popen('git log -1 --format="format:%h"').read()
enc_file = open('encoding.out.h','w')
- enc_file.write(f'''
+ enc_file.write(f'''/* SPDX-License-Identifier: BSD-3-Clause-Clear */
+
/*
-* This file is auto-generated by running 'make' in
-* https://github.com/riscv/riscv-opcodes ({commit})
-*/
+ * This file is auto-generated by running 'make' in
+ * https://github.com/riscv/riscv-opcodes ({commit})
+ */
+
{enc_header}
/* Automatically generated by parse_opcodes. */
#ifndef RISCV_ENCODING_H