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

PCodeConverter: Handle upper case space names. #231

Merged
merged 1 commit into from
Aug 28, 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
10 changes: 6 additions & 4 deletions ailment/converter_pcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,9 @@ def _convert_load(self) -> None:
"""
spc = self._current_op.inputs[0].getSpaceFromConst()
out = self._current_op.output
assert spc.name in {"ram", "mem", "register"}
if spc.name == "register":
spc_name = spc.name.lower()
assert spc_name in {"ram", "mem", "register"}
if spc_name == "register":
# load from register
res = self._get_value(self._current_op.inputs[1])
stmt = self._set_value(out, res)
Expand All @@ -442,8 +443,9 @@ def _convert_store(self) -> None:
Convert a p-code store operation
"""
spc = self._current_op.inputs[0].getSpaceFromConst()
assert spc.name in {"ram", "mem", "register"}
if spc.name == "register":
spc_name = spc.name.lower()
assert spc_name in {"ram", "mem", "register"}
if spc_name == "register":
# store to register
out = self._current_op.inputs[2]
res = self._get_value(self._current_op.inputs[1])
Expand Down
Loading