Skip to content

Improving Rotation Translation #83

@l-kent

Description

@l-kent

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions