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

Use Intel register syntax for Tricore #2067

Merged
merged 2 commits into from
Jun 30, 2023

Conversation

XVilka
Copy link
Contributor

@XVilka XVilka commented Jun 28, 2023

Addresing this issue: TriDis/ditricore#1 (comment)

@XVilka
Copy link
Contributor Author

XVilka commented Jun 28, 2023

@imbillow @arkup take a look please

@arkup
Copy link
Contributor

arkup commented Jun 28, 2023

@XVilka looks good thanks. I will do more test during the weekend after the merge

@imbillow
Copy link
Contributor

@imbillow @arkup take a look please

One question: Do intermediate values need to be prefixed with #?

@arkup
Copy link
Contributor

arkup commented Jun 28, 2023

@imbillow @arkup take a look please

One question: Do intermediate values need to be prefixed with #?

Well, it would be great if 0x... were prefixed with #0x..., as it's Tricore listing / formatting used in the IDA/Ghidra/Lauterbach debugger. If someone is parsing an ASM listing from another tool, it would make things a bit easier to have the same formatting.

@kabeor
Copy link
Member

kabeor commented Jun 30, 2023

Thanks, merged.

@kabeor kabeor merged commit f8f50f0 into capstone-engine:next Jun 30, 2023
@XVilka XVilka deleted the tricore-intel-syntax branch June 30, 2023 09:49
@arkup
Copy link
Contributor

arkup commented Jun 30, 2023

sorry, it seems that something went wrong. I just compiled it in my own application, and now the some mnemonics are messed up.

previously:

.text:8000041c mov.aa %a14, %sp
.text:8000041e sub.a %sp, 0x20
.text:80000420 st.w [%a14]-0xc, %d4
.text:80000424 st.w [%a14]-0x10, %d5
.text:80000428 st.w [%a14]-0x14, %d6
.text:8000042c st.w [%a14]-0x18, %d7
.text:80000430 mov %d15, 0xa
.text:80000432 st.w [%sp]0, %d15
.text:80000434 mov %d15, 0xb
.text:80000436 st.w [%sp]1, %d15

now:

.text:8000041c a14, sp
.text:8000041e oq31 0x20
.text:80000420 x [a14]-0xc, d4
.text:80000424 x [a14]-0x10, d5
.text:80000428 x [a14]-0x14, d6
.text:8000042c x [a14]-0x18, d7
.text:80000430 jz d15, 0xa
.text:80000432 h.b0, d15
.text:80000434 jz d15, 0xb
.text:80000436 h.b1, d15

@XVilka could you please have a look?

@XVilka
Copy link
Contributor Author

XVilka commented Jun 30, 2023

@arkup strange; my changes shouldn't affect that. Could you try please without this commit? 3341c1a

@arkup
Copy link
Contributor

arkup commented Jun 30, 2023

@XVilka I did quick test and without this commit I get the same problem. I mean mnemonics are messed up but I will double check in the evening.

@XVilka
Copy link
Contributor Author

XVilka commented Jun 30, 2023

Sorry, I forgot to regenerate the files, lol. @imbillow since you want to change the immediate format to use #, could you please update autogenerated files too?

@imbillow
Copy link
Contributor

Sorry, I forgot to regenerate the files, lol. @imbillow since you want to change the immediate format to use #, could you please update autogenerated files too?

Okay, I should be able to finish this today.

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

Successfully merging this pull request may close these issues.

4 participants