Commit Graph

3253 Commits

Author SHA1 Message Date
ExhoAR22
bc73cb232d Fix physical address truncation on 32-bit systems with addressing extensions (#2139)
* use hwaddr for paddrs

* Fix the truncation for memory hooks as well

* Add LPAE regression test


Co-authored-by: Takacs, Philipp <philipp.takacs@iosb.fraunhofer.de>
2025-04-01 10:53:18 +08:00
mio
820a18bb90 Fix val 2025-03-21 00:36:42 +08:00
mio
11a280cdbe Fix naming 2025-03-20 16:55:34 +08:00
mio
8afc23a839 Add TcgOp 2025-03-20 16:54:09 +08:00
mio
a09b822d8c Add TcgOpFlag 2025-03-20 16:51:54 +08:00
mio
1aa3909c78 Fix several consts
We should bump these for next release
2025-03-20 16:43:03 +08:00
mio
0bb1bbd93c Initialize delay_slot_flag correctly 2025-03-18 21:20:54 +08:00
Fernando
d755a8bed9 bindings/zig: Fix sample_riscv_zig partial writes and logging (#2133)
- Use full code length (instead of subtracting 1) when writing instructions.
- Uniformly zero-pad addresses in logs and print hexadecimal.
- Correct the instruction-hook callback in test_riscv2.
2025-03-16 11:05:17 +08:00
mio
df75effba3 Generate m68k consts 2025-03-10 11:32:14 +08:00
mio
3870cdcaf3 Format code 2025-03-10 11:31:53 +08:00
mio
d3674f84b4 implement m68k cr registers 2025-03-10 11:31:22 +08:00
mio
64c72267ae No version suffix for dotnet 2025-03-07 22:37:36 +08:00
mio
803fe5a477 Update changelog for 2.1.3 2025-03-07 19:43:00 +08:00
Antelox
98f78331ee CI(full), CI(release): Remove pinning
Author: Antelox <anteloxrce@gmail.com>
2025-03-07 18:55:08 +08:00
mio
d16289fb85 CI(full),CI(release): Last minor changes 2025-03-07 17:51:34 +08:00
@Antelox
87df11e0c4 Add Alpine Linux job (#2115) 2025-03-07 00:42:05 +08:00
PhilippTakacs
65ed715081 Snapshot use after free (#2125)
* memory snapshots fix use after free on flatview copy

When restoring a snapshot with memory the flatview must be restored
before the memory reagions are filtered. Because the
AddressSpaceDispatcher also has pointer to the MemoryRegions and on copy
they need to be cleared. The memory_filter_subregions function frees
MemoryRegions which are not used at the time of the snapshot.

* fix some memleaks in tests

These tests has forgott to call uc_close(uc), which lead to memory
leaks. Found by the LeakSanitizer.

* memory snapshots correct clean up container memory regions

* Fix further stackoverflow in tests

---------

Co-authored-by: mio <mio@lazym.io>
2025-03-06 23:23:02 +08:00
mio
088c066c59 Remove hack to copy function body 2025-03-05 16:49:25 +08:00
mio
4dc5f1e60f Fix wrong def 2025-03-05 15:16:29 +08:00
mio
986f67c70a Correct PRI 2025-03-05 00:32:10 +08:00
mio
e41ccc38e9 bump version 2025-03-05 00:32:09 +08:00
mio
6335755739 Remove endian.h 2025-03-05 00:32:05 +08:00
@Antelox
f18381016f Python bindings: Port pkg_resources to importlib_resources for python < 3.9 (#2123)
* Python bindings: Port pkg_resources to importlib_resources for python < 3.9

Co-authored-by: Arusekk <floss@arusekk.pl>

* GitHub Workflow: Bump uraimo/run-on-arch-action to v3

---------

Co-authored-by: Arusekk <floss@arusekk.pl>
2025-03-04 23:55:56 +08:00
mio
9da2fec784 Fix mips64 crash on x86 targets 2025-03-04 23:36:56 +08:00
mio
2128e01efc Init tcg region buffer 2025-02-25 13:52:26 +08:00
OBarronCS
76d97f8926 Support MIPS64 - write correct PC register width on uc_emu_start (#2111)
* Support mips64 - write correct pc register width on uc_emu_start

* Convert to UC_MODE_MIPS64

* Correctly select MIPS64 CPU model

* Simple 64-bit test - check it doesn't crash

* lint

* Comment

* Comment

* Add offset when indexing cpu model, makes tests work on older python

* Move test

* add PC check to test

* Fix test - add python version check

* Use RegressTest method for assert
2025-02-21 21:39:11 +08:00
mio
56ba3476e5 Fix long-standing mips delay slot issue 2025-02-19 17:39:24 +08:00
mio
8a2846369c A real world mips test from Qiling 2025-02-19 00:02:19 +08:00
mio
e7ad2fda91 Further fix MIPS delay slot 2025-02-18 23:34:09 +08:00
@Antelox
0f45f15e30 Python bindings: (#2112)
- Switch from versioningit to setuptools-scm
- Disable building of tests via DUNICORN_BUILD_TESTS var
2025-02-18 16:28:06 +08:00
mio
1cb8952b14 Default x86 CPU model to UC_CPU_X86_HASWELL
Rationale: Previouly, Unicorn uses several hacks to pretend it supports
floating point instructions while not properly setting up something
like CPU features. Therefore, once related registers like CR4 is reset,
the hacks stop working and UC_ERR_INSN_INVALID is thrown. Setting the default
model to a CPu that has basical floating point support should have the
minimal break changes.
2025-02-18 12:13:24 +08:00
mio
4d173ea376 Revert FPU related changes 2025-02-18 11:13:22 +08:00
mio
795d7cbdf0 Fix testing 2025-02-18 11:03:21 +08:00
mio
0f6ec4ca9d Also initialize CR4 for UC_MODE_32 2025-02-18 10:47:35 +08:00
mio
1dae6bb774 Correctly implement CR4 2025-02-18 10:43:52 +08:00
mio
8dcaa33c66 Bump 2.1.3 2025-02-17 20:26:31 +08:00
mio
9ec6b0be94 Add a test for fpr 2025-02-17 20:23:50 +08:00
mio
c97449869d Format code 2025-02-17 20:17:10 +08:00
mio
0c6f7c60d5 Implement mips floating point related registers 2025-02-17 20:16:36 +08:00
@Antelox
f2e80ff5be - Remove a slash for aarch64 job that resulted to be a leftover from previous refactoring (#2107)
- More cleanup
2025-02-17 11:11:40 +08:00
@Antelox
8d52ece48b Replaced custom deprecated decorator with simple DeprecationWarning (#2110) 2025-02-16 23:04:42 +08:00
mio
bf5e335269 Remove types for __deprecated as ParamSpec not available on Py3.8 2025-02-15 20:50:20 +08:00
mio
7ec987e626 Basic test for previous regression 2025-02-15 20:17:18 +08:00
mio
a2d666c8e7 Remove incorrect typing reference 2025-02-15 20:12:48 +08:00
mio
a4d8c302a6 Format by removing extra empty lines 2025-02-15 20:11:55 +08:00
mio
c529d6d8f5 We accidentally introduce a break change for
removing ctl_tlb_mode.
2025-02-15 20:04:53 +08:00
@Antelox
fe41e72b96 GitHub Workflow: (#2106)
- Switched from windows-2019 to windows-2022
- Switched to ubuntu-24.04-arm image for Linux aarch64 jobs
- Fixed Linux x86 job. It was failing but not reported
- Switched from Visual Studio 16 2019 generators to Visual Studio 17 2022
- Uncommented Windows MINGW32 static and shared jobs
- Generic clean-up
2025-02-15 18:23:10 +08:00
Disconnect3d
d03c0922e6 Fix #2103: qemu/target/ppc/mem_helper.c remove redundant return statements (#2104) 2025-02-15 01:04:30 +08:00
mio
7fd2aa47d4 Fix nuget workflow yaml 2025-02-13 23:42:21 +08:00
mio
3e99b859a8 Update nuget workflow to allow manual release 2025-02-13 23:39:45 +08:00