Skip to content

Commit bfff110

Browse files
authored
Refine JIT template for disabled extensions (#319)
Previously, the script used for generating the JIT template did not account for disabled extensions. This commit rectifies the template generation process to consider these disabled extensions. In addition, CI pipeline is refined for such scenario. Close #318
1 parent 4e00b03 commit bfff110

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
- name: JIT test
3535
run: |
3636
make ENABLE_JIT=1 clean check
37+
make ENABLE_EXT_A=0 ENABLE_JIT=1 clean check
38+
make ENABLE_EXT_C=0 ENABLE_JIT=1 clean check
39+
make ENABLE_EXT_F=0 ENABLE_JIT=1 clean check
3740
3841
host-arm64:
3942
runs-on: ubuntu-22.04
@@ -59,6 +62,9 @@ jobs:
5962
make
6063
make check
6164
make ENABLE_JIT=1 clean check
65+
make ENABLE_EXT_A=0 ENABLE_JIT=1 clean check
66+
make ENABLE_EXT_C=0 ENABLE_JIT=1 clean check
67+
make ENABLE_EXT_F=0 ENABLE_JIT=1 clean check
6268
6369
coding-style:
6470
runs-on: ubuntu-22.04

tools/gen-jit-template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def parse_argv(EXT_LIST, SKIP_LIST):
110110
for ext in EXT_LIST:
111111
SKIP_LIST += INSN[ext]
112112

113-
# parse_argv(EXT_LIST, SKIP_LIST)
113+
parse_argv(EXT_LIST, SKIP_LIST)
114114
# prepare PROLOGUE
115115
output = ""
116116
f = open('src/rv32_template.c', 'r')
@@ -125,7 +125,7 @@ def parse_argv(EXT_LIST, SKIP_LIST):
125125
op = []
126126
impl = []
127127
for i in range(len(emulate_funcs)):
128-
op.append(emulate_funcs[i][5:emulate_funcs[i].find(',')])
128+
op.append(emulate_funcs[i][5:emulate_funcs[i].find(',')].strip())
129129
impl.append(codegen_funcs[i])
130130

131131
f.close()

0 commit comments

Comments
 (0)