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

Improving Rotation Translation #83

Open
l-kent opened this issue Jun 10, 2024 · 0 comments
Open

Improving Rotation Translation #83

l-kent opened this issue Jun 10, 2024 · 0 comments

Comments

@l-kent
Copy link

l-kent commented Jun 10, 2024

The ASL ROR() method currently does not translate ideally, due to having an internal assertion and branching.

aslp/mra_tools/arch/arch.asl

Lines 14483 to 14489 in abd63cb

bits(N) ROR(bits(N) x, integer shift)
assert shift >= 0;
if shift == 0 then
result = x;
else
(result, -) = ROR_C(x, shift);
return result;

It is analogous to the ASR(), LSL() and LSR() methods which are handled with the added asr_bits, lsl_bits and lsr_bits methods, and the approach taken with those seems possible to extend to ROR() as well. SMT-Lib has a rotate_right function that could serve as a translation target in a similar way to how the asr_bits function represents the SMT-Lib asr function.

@ncough ncough mentioned this issue Nov 27, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant