Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python script on windows #258

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def process_enc_line(line, ext):
# the name of the instruction
single_dict['encoding'] = "".join(encoding)
single_dict['variable_fields'] = args
single_dict['extension'] = [ext.split('/')[-1]]
single_dict['extension'] = [os.path.basename(ext)]
single_dict['match']=hex(int(match,2))
single_dict['mask']=hex(int(mask,2))

Expand Down Expand Up @@ -235,7 +235,7 @@ def create_inst_dict(file_filter, include_pseudo=False, include_pseudo_ops=[]):
# call process_enc_line to get the data about the current
# instruction
(name, single_dict) = process_enc_line(line, f)
ext_name = f.split("/")[-1]
ext_name = os.path.basename(f)

# if an instruction has already been added to the filtered
# instruction dictionary throw an error saying the given
Expand Down Expand Up @@ -403,7 +403,7 @@ def create_inst_dict(file_filter, include_pseudo=False, include_pseudo_ops=[]):
var = instr_dict[name]["extension"]
if instr_dict[name]['encoding'] != single_dict['encoding']:
err_msg = f'imported instruction : {name} in '
err_msg += f'{f.split("/")[-1]} is already '
err_msg += f'{os.path.basename(f)} is already '
err_msg += f'added from {var} but each have different encodings for the same instruction'
logging.error(err_msg)
raise SystemExit(1)
Expand Down
Loading