Skip to content

Commit

Permalink
Fix file paths for singularity
Browse files Browse the repository at this point in the history
Signed-off-by: Afonso Oliveira <[email protected]>
  • Loading branch information
AFOliveira committed Nov 14, 2024
1 parent b2db90a commit 20d181f
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions ext/binutils-gdb/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ def format_encoding(encoding_str):
group4 = encoding_str[20:25] # bits 11-7
group5 = encoding_str[25:32] # bits 6-0

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

Expand Down Expand Up @@ -229,13 +227,6 @@ def parse_yaml_encoding(yaml_file_path):
if not isinstance(yaml_content, dict) or not yaml_content:
print(f"Warning: YAML file '{yaml_file_path}' is empty or not properly formatted.")
return ''

# Assuming the YAML structure has the instruction name as the top key
# and 'encoding' as a subkey
# Example:
# add:
# encoding:
# match: "0000000----------000-----0110011"
instr_name = list(yaml_content.keys())[0]
encoding = yaml_content[instr_name].get('encoding', {})
match_encoding = encoding.get('match', '')
Expand All @@ -256,17 +247,16 @@ def main():
# Define file paths here
# Update these paths based on your actual file locations
header_files = [
'binutils/include/opcode/riscv-opc.h',
'binutils/include/opcode/riscv.h' # Replace with your actual additional header file names
'ext/binutils-gdb/binutils/include/opcode/riscv-opc.h',
'ext/binutils-gdb/binutils/include/opcode/riscv.h'
]

instruction_files = [
'binutils/opcodes/riscv-opc.c'
# Add more instruction definition files if necessary
'ext/binutils-gdb/binutils/opcodes/riscv-opc.c'
]

# Define the path to the directory containing YAML files
yaml_directory = '../../arch/inst/' # Replace with your actual directory path
yaml_directory = 'arch/inst/'

# Get instruction YAML mappings from the YAML directory recursively
instr_yaml_map = get_instruction_yaml_files(yaml_directory)
Expand Down

0 comments on commit 20d181f

Please sign in to comment.