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

AAarch64 architectural model cannot handle barrel shift with different capitalization #68

Open
mkannwischer opened this issue Jul 10, 2024 · 0 comments

Comments

@mkannwischer
Copy link
Collaborator

Works fine:

eor sAga, tmp,  sAga_, ror #39

This breaks:

eor sAga, tmp,  sAga_, ROR #39
Traceback (most recent call last):
  File "/home/mjk/git/pqax/slothy/example.py", line 1579, in <module>
    main()
  File "/home/mjk/git/pqax/slothy/example.py", line 1574, in main
    run_example(e, debug=args.debug, dry_run=args.dry_run,
  File "/home/mjk/git/pqax/slothy/example.py", line 1570, in run_example
    ex.run(**kwargs)
  File "/home/mjk/git/pqax/slothy/example.py", line 151, in run
    self.core(slothy, *self.extra_args)
  File "/home/mjk/git/pqax/slothy/example.py", line 1380, in core
    slothy.optimize(start="loop_0", end="end_loop_0")
  File "/home/mjk/git/pqax/slothy/slothy/core/slothy.py", line 259, in optimize
    early, core, late, num_exceptional = Heuristics.periodic(body, logger, c)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjk/git/pqax/slothy/slothy/core/heuristics.py", line 302, in periodic
    dfg = DFG(body, logger.getChild("dfg_generate_outputs"),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjk/git/pqax/slothy/slothy/core/dataflow.py", line 583, in __init__
    self.src = self._parse_source(src)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjk/git/pqax/slothy/slothy/core/dataflow.py", line 629, in _parse_source
    return list(map(self._parse_line, SourceLine.reduce_source(src)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjk/git/pqax/slothy/slothy/core/dataflow.py", line 621, in _parse_line
    insts = self.arch.Instruction.parser(l)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mjk/git/pqax/slothy/slothy/targets/aarch64/aarch64_neon.py", line 554, in parser
    raise Instruction.ParsingException(
slothy.targets.aarch64.aarch64_neon.Instruction.ParsingException: Couldn't parse eor x2, x30,  x3, ROR #39
You may need to add support for a new instruction (variant)?

We should make the parsing more robust.

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