Skip to content

Commit 20d181f

Browse files
committed
Fix file paths for singularity
Signed-off-by: Afonso Oliveira <[email protected]>
1 parent b2db90a commit 20d181f

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

ext/binutils-gdb/encoding.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ def format_encoding(encoding_str):
184184
group4 = encoding_str[20:25] # bits 11-7
185185
group5 = encoding_str[25:32] # bits 6-0
186186

187-
# Combine groups with no separators as per desired format
188-
# Example: 0000000----------000-----0110011
189187
formatted_str = f"{group1}{group2}{group3}{group4}{group5}"
190188
return formatted_str
191189

@@ -229,13 +227,6 @@ def parse_yaml_encoding(yaml_file_path):
229227
if not isinstance(yaml_content, dict) or not yaml_content:
230228
print(f"Warning: YAML file '{yaml_file_path}' is empty or not properly formatted.")
231229
return ''
232-
233-
# Assuming the YAML structure has the instruction name as the top key
234-
# and 'encoding' as a subkey
235-
# Example:
236-
# add:
237-
# encoding:
238-
# match: "0000000----------000-----0110011"
239230
instr_name = list(yaml_content.keys())[0]
240231
encoding = yaml_content[instr_name].get('encoding', {})
241232
match_encoding = encoding.get('match', '')
@@ -256,17 +247,16 @@ def main():
256247
# Define file paths here
257248
# Update these paths based on your actual file locations
258249
header_files = [
259-
'binutils/include/opcode/riscv-opc.h',
260-
'binutils/include/opcode/riscv.h' # Replace with your actual additional header file names
250+
'ext/binutils-gdb/binutils/include/opcode/riscv-opc.h',
251+
'ext/binutils-gdb/binutils/include/opcode/riscv.h'
261252
]
262253

263254
instruction_files = [
264-
'binutils/opcodes/riscv-opc.c'
265-
# Add more instruction definition files if necessary
255+
'ext/binutils-gdb/binutils/opcodes/riscv-opc.c'
266256
]
267257

268258
# Define the path to the directory containing YAML files
269-
yaml_directory = '../../arch/inst/' # Replace with your actual directory path
259+
yaml_directory = 'arch/inst/'
270260

271261
# Get instruction YAML mappings from the YAML directory recursively
272262
instr_yaml_map = get_instruction_yaml_files(yaml_directory)

0 commit comments

Comments
 (0)