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

V850: Improve RH850 support, add RzIL uplifting #4103

Merged
merged 4 commits into from
Feb 2, 2024
Merged

V850: Improve RH850 support, add RzIL uplifting #4103

merged 4 commits into from
Feb 2, 2024

Conversation

imbillow
Copy link
Contributor

@imbillow imbillow commented Jan 13, 2024

SQUASH ME

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

V850 and RH850 manual https://www.renesas.com/us/en/document/mah/v850-familytm-architecture

Test plan

  • CI is green
  • aaa and plf @@F on all samples make sense

Closing issues

Closes rizinorg/ideas#9

@XVilka
Copy link
Member

XVilka commented Jan 14, 2024

You can also check it on the example V850 file from #2316 or #2317

Copy link
Member

@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.

In the disassembler (librz/asm/p/asm_v850.c), please also use the new rz_asm_op_setf_asm() API to reduce one more allocation per instruction (#4127).

@imbillow
Copy link
Contributor Author

I've noticed that there are a few differences between the various minor versions of RH850, but I can't find documentation for them on the web.

@XVilka
Copy link
Member

XVilka commented Jan 25, 2024

Please rebase

Copy link
Member

@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.

LGTM overall

librz/analysis/arch/v850/v850_il.c Show resolved Hide resolved
librz/asm/arch/v850/v850_disas.h Show resolved Hide resolved
test/db/analysis/v850 Show resolved Hide resolved
Copy link
Member

@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.

The V850/RH850 and RzIL parts are good now; also tested but are blocked until #4179 is sorted out.

@imbillow imbillow force-pushed the rzil-v850 branch 2 times, most recently from 32b8ed3 to 9a11095 Compare February 2, 2024 14:40
@XVilka
Copy link
Member

XVilka commented Feb 2, 2024

@imbillow please rebase

v850: fix fallthrough

v850: Add docs

V850: fix v850 prelude

V850: add `loop`

V850: add docs to register profile

V850: fix tests

V850: add `syscall`

V850: add `sx[bh]` `zx[bh]`

V850: add `snooze` `sync?` `switch`

V850: add `sbf` `sch[01][lr]`

V850: fix `rotl`

V850: add `rie` `rotl`

V850: add `pushsp` `popsp`

V850: add `mac` `macu`

V850: add `ldl.w` `stc.w`

V850: add `hsh` `hsw`

V850: add `feret` `eiret`

V850: add `fetrap`

V850: add `cll` `ctret` `cmov`

V850: add caxi

V850: add callt

V850: fix

V850: add bsw

V850: add bsh

V850: fix bins

V850: add bins

V850: fix add and add adf

V850: format

V850: fix stack-buffer-overflow

V850: add emulateme test

V850: fix dispose and prepare

V850: fix

V850: fix

V850: fix

V850: fix all

V850: fix mulh and cmp satadd add shl shr sar

V850: mov

V850: fix sld.*

V850: fix runtime error left shift

V850: fix test

V850: fix jarl and refactor

V850: fix ld st

V850: fix inst.format

V850: fix rzil ld.*

V850: fix rzil dispose and prepare

V850: fix rzil and register profile

V850: fix disas memleak
@XVilka XVilka changed the title Rzil v850 & rh850 V850: Improve RH850 support, add RzIL uplifting Feb 2, 2024
@XVilka XVilka merged commit 6eeb9e4 into dev Feb 2, 2024
47 checks passed
@XVilka XVilka deleted the rzil-v850 branch February 2, 2024 22:28
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.

Add support for RH850 architecture
2 participants