Triton is a dynamic binary analysis library. Build your own program analysis tools, automate your reverse engineering, perform software verification or just emulate code.
The micro code implementation of idiv is incorrect and return invalid result when compare to the proper idiv result from Unicorn and Real CPU execution. Below is the PoC.
The micro code implementation of idiv is incorrect and return invalid result when compare to the proper idiv result from Unicorn and Real CPU execution. Below is the PoC.
You can also see the proper result here which is 0x4B28D4D5 | 1260967125 in rax. Not 0x4b283dd5. https://godbolt.org/z/GW6zo4xaq
In summary, executing this assembly below
in both Unicorn and Triton give different result and the correct one happen to be Unicorn since it matches up with real CPU execution.
Triton: r9: 0xb2087569 rax: 0x4b283dd5 Unicorn: r9: 0xb2087569 rax: 0x4b28d4d5