ab565729e7
Format code
2025-01-18 15:18:49 +08:00
a0fa2c1249
Fix a warning
2025-01-18 15:18:37 +08:00
99c57a8ecf
Add a test for #1643
2025-01-18 15:17:47 +08:00
80f0dac6f0
Fix warning
2025-01-04 17:21:02 +08:00
2c688bae73
Remove the outdated hack to zero all code gen buffer
...
This shall also improve performance
Fix #2001
2025-01-04 17:05:34 +08:00
fcca82bb28
Format code
2025-01-04 15:48:54 +08:00
Michael-c0de
4f417c3f11
patch multiple UC_HOOK_MEM callbacks for unaligned access ( #2063 )
...
* patch multiple UC_HOOK_MEM callbacks for unaligned access
* update test_x86.c for #2063
* update test_x86.c for build on win
---------
Co-authored-by: yaojiale2024@iscas.ac.cn <yaojiale2024@iscas.ac.cn >
Co-authored-by: lazymio <mio@lazym.io >
2024-12-29 23:24:32 +08:00
Pedro Tôrres
7737e7b436
make i386 instructions RDTSC and RDTSCP hookable ( #2066 )
...
* instruction hooks for RDTSC and RDTSCP
Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com >
* update hookable instruction list
Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com >
* test RDTSC and RDTSCP instruction hooks
Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com >
---------
Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com >
Co-authored-by: mio <mio@lazym.io >
2024-12-20 17:17:23 +08:00
PhilippTakacs
ab23d4ceb0
Optimize Notdirty write ( #2031 )
...
* enable notdirty_write for snapshots when possible
Snapshots only happens when the priority of the memory region is smaller
then the snapshot_level. After a snapshot notdirty can be set.
* disable notdirty_write for self modifying code
When SMC access the memory region more then once the
tb must be rebuild multible times.
fixes #2029
* notdirty_write better hook check
Check all relevant memory hooks before enabling notdirty write.
This also checks if the memory hook is registered for the affected
region. So it is possible to use notdirty write and have some hooks
on different addresses.
* notdirty_write check for addr_write in snapshot case
* self modifying code clear recursive mem access
when self modifying code does unaligned memory accese sometimes
uc->size_recur_mem is changed but for notdirty write not changed back.
This causes mem_hooks to be missed. To fix this uc->size_recur_mem is
set to 0 before each cpu_exec() call.
2024-11-01 00:02:11 +08:00
0886e53572
Format code
2024-10-06 23:32:16 +08:00
851914c8d0
Fix segfault if tlb is flushed in the hooks
2024-10-06 23:31:46 +08:00
87c0b86248
Format code
2024-09-21 17:59:23 +08:00
Duncan Ogilvie
87610baa3f
Fix emulator detection ( #1966 )
...
* Add a quick test helper macro to test_x86.c
* Add regression tests for bswap and rex prefixes
* Properly ignore REX prefixes when appropriate
* Fix bswap ax emulator detection
2024-07-19 11:11:21 +08:00
Nguyen Anh Quynh
c136b6b2bf
fix some compiler warnings
2024-04-22 20:03:07 +08:00
f3323469d0
Format
2024-02-12 00:10:58 +08:00
Dimitris Glynos
9d8e639c69
fix fxsave fpip value, provide tests
2023-10-26 08:42:58 +03:00
6801e156aa
Format code
2023-08-06 21:53:42 +08:00
30bc08611b
Add a unit test for #1717
2023-08-06 21:53:04 +08:00
aee4038526
Fix test_x86_0xff_lcall test
2023-07-07 18:50:55 +08:00
2325f41ead
Add a unit test for a7a5d187e7
2023-06-30 20:28:59 +08:00
Robert Xiao
d7a806c026
Reformat code with format.sh
2023-06-16 15:23:41 -07:00
Takacs, Philipp
073c4b74ca
load_helper only call cpu_loop_exit() when emulation is running
...
The load_helper is sometimes called from register writes. When the load
fails check if emulation is running before jump out of the emulated code.
2023-05-09 14:58:40 +02:00
Takacs, Philipp
e96ac42b2e
Remove MMU hacks
...
Unicorn has included some ugly hacks to provide a envirement where vaddr == paddr.
These hacks where to use the full 64 bit mappings on x86 without init the mmu
and some memory redirect for MIPS.
The UC_TLB_CPU mode defaults to vaddr == paddr, therfor these hacks aren't
required anymore.
2023-03-28 14:02:17 +02:00
Takacs, Philipp
e25419bb2d
add virtuall tlb
...
this virtuall tlb allows to use mmu indipendent of the architectur
2023-03-28 13:50:11 +02:00
Takacs, Philipp
7f1eb4532d
add basic mmu tests
...
Some simple tests for diffrent mmu.
Basicly add some tlb entries, enable the mmu try to read from virtual address
The aarm64 test was provided by imre-kis-arm in #1718
2023-03-28 13:50:11 +02:00
133504b504
Fix wrong IP in x86_16 because of cs_base not substracted
2023-02-20 20:21:56 +01:00
fc193ffe24
Fix missing macros
2022-10-28 17:55:39 +02:00
a40bf26263
Disable test_x86_unaligned_access on be hosts
2022-10-28 17:53:20 +02:00
428ed8fd21
Fix test_x86_unaligned_access for big endian hosts
2022-10-28 17:47:55 +02:00
4b961a8ef6
Apply fix for big endian hosts per #1710
2022-10-28 16:20:20 +02:00
Nguyen Anh Quynh
b99ec09c90
tests: remove unused var
2022-10-12 14:43:01 +08:00
a0e119c6f0
Format code
2022-08-31 23:27:24 +08:00
bdb141aeef
Disable unaligned access test on ppc and aarch64
...
The memoy read operations on these architectures are inlined
e.g. ldur on aarch64
2022-08-14 15:42:37 +02:00
419d710c4a
Return true when we handled the memory events
2022-08-14 13:37:25 +02:00
2c00546c6e
Merge rhelmot's fix
2022-08-14 13:35:54 +02:00
d6d57834b0
Format code
2022-07-23 19:27:37 +08:00
c7ff9d66cf
Move vex.l test to test_x86
2022-07-23 19:26:35 +08:00
ba50035830
Format code
2022-05-23 12:30:44 +02:00
dae48aecee
Mem hook should return a bool
2022-05-20 13:31:54 +02:00
0d41d4bbb2
Merge QDucasse:x86_hook_address for tests
2022-05-20 13:07:49 +02:00
Quentin DUCASSE
8ee9e89f01
Fixed code comment for x86 tests
2022-05-04 17:06:48 +02:00
Quentin DUCASSE
a3ed8bbce5
Tests for jump hook address
2022-05-04 16:51:43 +02:00
ed90e98d81
Generate a TB at least to make sure cahce is not cleared for ADD and DEC
2022-04-26 01:18:00 +02:00
d3f1ec1345
Add a test for count hook cache
2022-04-26 01:17:59 +02:00
shuffle2
2912cd1e29
fix rust bindings build on windows ( #1584 )
...
Refine rust bindings.
2022-04-16 13:40:04 +02:00
3112cd920e
Add a test for nested uc_emu_start exits
2022-03-06 23:51:35 +01:00
d946114dfe
Set EFLAGS correctly on startup
2022-02-25 22:44:42 +01:00
186be25c40
Fix wrong mode in tests
2022-02-25 22:28:26 +01:00
45b5d7d8d2
Add test for caf2fe1ddb
2022-02-25 22:24:17 +01:00
2ad9f152f9
Set emulation_done to true if and only if we exit the outer uc_emu_start
...
Or we may lost uc_emu_stop wrongly
2022-01-19 21:58:46 +01:00