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

xtensa: update to espressif/llvm-project #2533

Merged
merged 16 commits into from
Nov 10, 2024

Conversation

imbillow
Copy link
Contributor

@imbillow imbillow commented Nov 3, 2024

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

https://github.com/espressif/llvm-project

for llvm-capstone sync with this PR capstone-engine/llvm-capstone#65

Test plan

...

Closing issues

...

Copy link
Collaborator

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a great update! Excellent!

Only small nit picks.

Also, please seriously consider to add the instruction formats as well.
You can easily add them just like PPC does:

enum {
  XTENSA_FORMAT_INVALID = 0,
  XTENSA_FORMAT_RRR_INST,
  XTENSA_FORMAT_16BIT = 1 << 16,
  XTENSA_FORMAT_24BIT = 1 << 17,
...
}

This feature is very useful. Because if Capstone decoes stuff incorrectly and users are in a rush, they can always extract operand bits manually. So it provides an easy way of hot fixing stuff and checking for bits.

arch/Xtensa/XtensaInstPrinter.c Outdated Show resolved Hide resolved
}
}
}
printInstruction(MI, Address, O);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It i probably a good idea to support also alias with printAliasInstr.
But you can also skip it, if you are in a rush. Just please open an issue about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel like it's a particularly important feature, and I think it could be supported later.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, no problem. Please open an issue about it after merge.

suite/cstest/include/test_detail_xtensa.h Show resolved Hide resolved
suite/cstest/src/test_detail_xtensa.c Show resolved Hide resolved
arch/Xtensa/XtensaMapping.c Show resolved Hide resolved
tests/MC/Xtensa/l32r.yaml Outdated Show resolved Hide resolved
tests/integration/test_litbase.c Show resolved Hide resolved
- Delete unused code
- Add billow's copyright
- Add test for LLVM_DEBUG patch
@github-actions github-actions bot added the CS-core-files auto-sync label Nov 4, 2024
@github-actions github-actions bot added the python bindings label Nov 4, 2024
@imbillow imbillow marked this pull request as ready for review November 5, 2024 02:25
@imbillow imbillow requested a review from Rot127 November 5, 2024 02:25
@Rot127
Copy link
Collaborator

Rot127 commented Nov 5, 2024

In case you missed it: capstone-engine/llvm-capstone#62
Sorry, forgot to merge it before.

Copy link
Collaborator

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, almost done. Please just add a detail test case for the: format, mem_base, mem_disp, immediate and access information.

Then we are good to go. Maybe we even get it into the patch release.
@kabeor Please review as well.

@imbillow
Copy link
Contributor Author

imbillow commented Nov 6, 2024

In case you missed it: capstone-engine/llvm-capstone#62 Sorry, forgot to merge it before.

https://github.com/espressif/llvm-project/blob/2db67a2fd77dc134f025cbcd79812762877c44f1/llvm/lib/Target/Xtensa/Disassembler/XtensaDisassembler.cpp#L562-L568

This issue has been fixed in the esp branch

Copy link
Collaborator

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kabeor Please take a look :)

Copy link
Contributor

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kabeor please merge this one before the release

Copy link
Member

@kabeor kabeor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Merge now, thank you.

@kabeor kabeor merged commit 1ecfb5b into capstone-engine:next Nov 10, 2024
19 checks passed
@imbillow imbillow deleted the xtensa-espressif branch November 11, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants