Commit Graph

9 Commits

Author SHA1 Message Date
Robert Xiao
074566cf69 Slight refactoring to reduce code duplication.
This also comes with a performance bump due to inlining of reg_read/reg_write
(as they're only called once now) and the unlikely() on CHECK_REG_TYPE.
2023-06-16 15:23:42 -07:00
Robert Xiao
4055a5ab10 Implement uc_reg_{read,write}{,_batch}2 APIs.
These APIs take size parameters, which can be used to properly bounds-check the
inputs and outputs for various registers. Additionally, all backends now throw
UC_ERR_ARG if the input register numbers are invalid.

Completes #1831.
2023-06-16 15:23:42 -07:00
Takacs, Philipp
b7b1a4d6b4 difference between stop_request and quit_request
quit_request is for internal use. This means the IP register was updated and
qemu needs to rebuild the translation blocks.

stop_request is set by the user (uc_emu_stop) to indecate that unicorn sould
stop emulating.
2023-03-07 14:38:49 +01:00
9167ab8671 Set riscv_get_pc for uc->get_pc 2022-05-21 00:02:22 +02:00
345b63ee96 Only exit TB if pc is within the memory range 2022-05-07 00:16:31 +02:00
c6fdbb3735 Add RISCV CSR registers 2021-11-07 20:36:04 +01:00
172a2fbe6d Support changing cpu model for riscv 2021-11-04 19:13:53 +01:00
e62b0ef255 Add clang-format and format code to qemu code style 2021-10-29 12:44:49 +02:00
Nguyen Anh Quynh
aaaea14214 import Unicorn2 2021-10-03 22:14:44 +08:00