[Hexagon] RzIL uplifiting
WIP
Your checklist for this pull request
- [x] I've read the guidelines for contributing to this repository
- [x] I made sure to follow the project's coding style
- [x] I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
- [x] 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
Future Hexagon uplifting PR.
Currently successful compile instructions (and tested):
[*] 1573/1733 standard instructions compiled.
[*] 431/643 HVX instructions compiled.
[*] In total: 2004/2376 instructions compiled.
Test plan
...
TODO
- [ ] Generate jumps always at the end of a packet.
- [ ]
WARNING: Invalid il ops sequence! There should be at least two il ops per packet.ifget_il_ops()is called for unimplemented instructions.
Open this for the first round of review now.
There are still the rz-test cases missing. Due to inner working of the RzIL generation it is not really possible to add the asm style tests (so I check it again to be sure). Instead I would simply execute most test bins to the address where they can be considered passed.
Currently the tests fail due to missing https://github.com/rizinorg/rizin/pull/3973
In order that the tests succeed we need https://github.com/rizinorg/rizin-testbins/pull/127 merged though. Before that maybe look at https://github.com/rizinorg/rizin/pull/3837/files#diff-a1583f59ca1cc7b3c25cde35c24fade6df510112bcf21174d5d2995a5baa14e2
@thestr4ng3r To your notice: https://github.com/rizinorg/rizin/pull/3837/commits/722e5c0a624136b7a07cd4d2ee42e54d3c5fc0c6
rebase.
If this is green, could you guys take a look at it again.
If this is green, could you guys take a look at it again.
It's not:
101/102 rizin:unit / tokens FAIL 1.03s killed by signal 6 SIGABRT
>>> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=183 LD_LIBRARY_PATH=/home/runner/work/rizin/rizin/build/librz/egg:/home/runner/work/rizin/rizin/build/librz/reg:/home/runner/work/rizin/rizin/build/librz/core:/home/runner/work/rizin/rizin/build/librz/hash:/home/runner/work/rizin/rizin/build/librz/bp:/home/runner/work/rizin/rizin/build/librz/search:/home/runner/work/rizin/rizin/build/librz/asm:/home/runner/work/rizin/rizin/build/librz/demangler:/home/runner/work/rizin/rizin/build/librz/flag:/home/runner/work/rizin/rizin/build/librz/parse:/home/runner/work/rizin/rizin/build/librz/debug:/home/runner/work/rizin/rizin/build/librz/crypto:/home/runner/work/rizin/rizin/build/librz/io:/home/runner/work/rizin/rizin/build/librz/il:/home/runner/work/rizin/rizin/build/librz/util:/home/runner/work/rizin/rizin/build/librz/magic:/home/runner/work/rizin/rizin/build/librz/lang:/home/runner/work/rizin/rizin/build/librz/cons:/home/runner/work/rizin/rizin/build/librz/bin:/home/runner/work/rizin/rizin/build/librz/sign:/home/runner/work/rizin/rizin/build/librz/type:/home/runner/work/rizin/rizin/build/librz/diff:/home/runner/work/rizin/rizin/build/librz/config:/home/runner/work/rizin/rizin/build/librz/syscall:/home/runner/work/rizin/rizin/build/librz/socket:/home/runner/work/rizin/rizin/build/librz/analysis:/home/runner/work/rizin/rizin/build/librz/main:/home/runner/lib/x86_64-linux-gnu:/home/runner/lib:/home/runner/lib64: /home/runner/work/rizin/rizin/build/test/unit/test_tokens
Going to move https://github.com/rizinorg/rizin/pull/3837/commits/458fc61836e82da8ceee5de36c58dca6d38bd200 into a separated PR. But first wanted to see if it finally works.
So besides https://github.com/rizinorg/rizin/issues/4121 everything runs fine now. I have no idea what the problem with it is unfortunately. But it isn't related to the RzIL stuff.
The appveyor fails due to https://github.com/rizinorg/rizin/issues/4121 and some timeouts, as it looks like. Though I wouldn't like to increase them anymore since they are already pretty high.
Please let me run all rz-tracetest tests after https://github.com/rizinorg/rizin/pull/4373. Just to be sure.
Ok, all good now:
./run-test-sets.sh -i -t essentials,float
test_vspliceb [PASS]
test_vpmpyh [PASS]
test_vminh [PASS]
test_vmaxh [PASS]
test_vlsrw [PASS]
test_vcmpw [PASS]
test_vcmpb [PASS]
test_vavgw [PASS]
test_round [PASS]
test_reorder [PASS]
test_packet [PASS]
test_mpyi [PASS]
test_lsr [PASS]
test_jmp [PASS]
test_hwloops [PASS]
test_hl [PASS]
test_fibonacci [PASS]
test_ext [PASS]
test_dotnew [PASS]
test_cmp [PASS]
test_clobber [PASS]
test_call [PASS]
test_bitsplit [PASS]
test_bitcnt [PASS]
test_abs [PASS]
usr [PASS]
v68_scalar [PASS]
v73_scalar [PASS]
test-vma [PASS]
load_align [PASS]
multi_result [PASS]
overflow [PASS]
first [PASS]
mem_noshuf [PASS]
preg_alias [PASS]
dual_stores [PASS]
mem_noshuf_exception [PASS]
read_write_overlap [PASS]
reg_mut [PASS]
misc [PASS]
fpstuff [PASS]