Skip to content

Conversation

@Changqing-JING
Copy link
Contributor

@Changqing-JING Changqing-JING commented Jan 6, 2025

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

Add tricore tc1.8 instructions:

add.df
sub.df
madd.df
msub.df
mul.df
div.df
cmp.df
max.df
min.df
min.f
max.f
dftoi
dftoiz
dftoin
ftoin
dftou
dftouz
dftol
dftoul
dftoulz
abs.f
abs.df
dftolz
neg.df
neg.f
qseed.df
itodf
utodf
ltodf
ultodf
dftof
ftodf
div64
div64.u
rem64
rem64.u

The inc files are updated by:
capstone-engine/llvm-capstone#73

...

Test plan

cmake --build ./build/linux-x64 && ./build/linux-x64/suite/cstest/Debug/cstest tests/MC/TriCore > build/test.lo

...

Closing issues

...

@XVilka
Copy link
Contributor

XVilka commented Jan 6, 2025

@imbillow and this one, please

cc @Rot127

@Changqing-JING
Copy link
Contributor Author

Since this PR is not merged yet. I added a bit more instructions

div64
div64.u
rem64
rem64.u

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.

I'll try to find time for a full review on the weekend. But please don't forget to add tests for the instruction details in tests/details.

@Changqing-JING
Copy link
Contributor Author

@Rot127 Thank you very much for review.
I have added tests to tests/details

But I still have a question. The tests under tests/details seems similar to tests/MC. What's the reason to have both? Why not merge them to one?

@Rot127
Copy link
Collaborator

Rot127 commented Jan 10, 2025

But I still have a question. The tests under tests/details seems similar to tests/MC. What's the reason to have both? Why not merge them to one?

The MC tests are copies of the assembler/disassembler regression tests from LLVM. They get translated from the LLVM format to our yaml test files with the Auto-Sync.
They effectively test all code which is from LLVM. And only the asm text. Not any of the details.

The detail tests on the other hand, test the code added by Capstone. So all the details. They should (but don't, yet) cover all functions in <ARCH>Mapping.c files.

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.

Lovely! Thanks a lot!
Just address those small comments please. Otherwise lgtm.
@kabeor

@Changqing-JING
Copy link
Contributor Author

Can we merge this PR?

Copy link
Contributor

@b1llow b1llow left a comment

Choose a reason for hiding this comment

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

LGTM

@Rot127
Copy link
Collaborator

Rot127 commented Jan 15, 2025

@Changqing-JING @kabeor has to review first. I don't have the privilege to merge without a second maintainer's approval.

@Rot127
Copy link
Collaborator

Rot127 commented Jan 16, 2025

Please rebase onto the latest next branch to run the labeler again.

add.df
sub.df
madd.df
msub.df
mul.df
div.df
cmp.df
max.df
min.df
min.f
max.f
dftoi
dftoiz
dftoin
ftoin
dftou
dftouz
dftol
dftoul
dftoulz
abs.f
abs.df
dftolz
neg.df
neg.f
qseed.df
itodf
utodf
ltodf
ultodf
dftof
ftodf
div64
div64.u
rem64
rem64.u
@Changqing-JING
Copy link
Contributor Author

Rebased

@Changqing-JING
Copy link
Contributor Author

Changqing-JING commented Jan 20, 2025

@kabeor Could you help to review this PR?

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, merged. Thx!

@kabeor kabeor merged commit 3c4d7fc into capstone-engine:next Jan 28, 2025
20 checks passed
@Changqing-JING Changqing-JING deleted the feature/tricore-tc18 branch January 28, 2025 14:26
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.

5 participants