aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests.Unicorn/libs
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2022-11-20 20:18:21 +0100
committerGitHub <noreply@github.com>2022-11-20 20:18:21 +0100
commit905a191e28fd9262d0fde97f3c2d100f74693c8d (patch)
treee430239067d37d25aaf8d6f476b3b5d5aaab0858 /Ryujinx.Tests.Unicorn/libs
parentab0491817e87b9dd134c41764ba213f8c8559e9b (diff)
Use upstream unicorn for Ryujinx.Tests.Unicorn (#3771)
* unicorn: Add modified ver of unicorns const gen * unicorn: Use upstream consts These consts were generated from the dev branch of unicorn * unicorn: Split common consts into multiple enums * unicorn: Remove arch prefix from consts * unicorn: Add new windows dll Windows 10 - MSVC x64 shared build * unicorn: Use absolute path for const generation * unicorn: Remove fspcr patch * unicorn: Fix using the wrong file extension For some reason _NativeLibraryExtension evaluates to ".so" even on Windows. * unicorn: Add linux shared object again * unicron: Add DllImportResolver * unicorn: Try to import unicorn using an absolute path * unicorn: Add clean target * unicorn: Replace IsUnicornAvailable() methods * unicorn: Skip tests instead of silently passing them if unicorn is missing * unicorn: Write error message to stderr * unicorn: Make Interface static * unicron: Include prefixed unicorn libs (libunicorn.so) Co-authored-by: merry <git@mary.rs> * unicorn: Add lib prefix to shared object for linux Co-authored-by: merry <git@mary.rs>
Diffstat (limited to 'Ryujinx.Tests.Unicorn/libs')
-rw-r--r--Ryujinx.Tests.Unicorn/libs/README.md8
-rw-r--r--Ryujinx.Tests.Unicorn/libs/linux/libunicorn.sobin0 -> 4500288 bytes
-rw-r--r--Ryujinx.Tests.Unicorn/libs/linux/unicorn_fspcr.patch24
-rw-r--r--Ryujinx.Tests.Unicorn/libs/windows/unicorn.dllbin4582400 -> 2178048 bytes
4 files changed, 3 insertions, 29 deletions
diff --git a/Ryujinx.Tests.Unicorn/libs/README.md b/Ryujinx.Tests.Unicorn/libs/README.md
index 427044f9..d05291e5 100644
--- a/Ryujinx.Tests.Unicorn/libs/README.md
+++ b/Ryujinx.Tests.Unicorn/libs/README.md
@@ -9,14 +9,12 @@ CPU simulator, Armeilleure.
On Windows, Unicorn is shipped as a pre-compiled dynamic library (`.dll`), licenced under the GPLv2.
-The source code for `windows/unicorn.dll` is available at: https://github.com/MerryMage/UnicornDotNet/tree/299451c02d9c810d2feca51f5e9cb6d8b2f38960
+The source code for `windows/unicorn.dll` is available at: https://github.com/unicorn-engine/unicorn/tree/df3aa0fccbce9e1420e82110cbae5951755a0698
## Linux
-On Linux, you will first need to download Unicorn from https://github.com/unicorn-engine/unicorn.
+On Windows, Unicorn is shipped as a pre-compiled shared object (`.so`), licenced under the GPLv2.
-Then you need to patch it to expose the FSPCR register by applying `linux/unicorn_fspcr.patch`
-
-Then, compile Unicorn from source with its `make.sh` script.
+The source code for `linux/unicorn.so` is available at: https://github.com/unicorn-engine/unicorn/tree/df3aa0fccbce9e1420e82110cbae5951755a0698
See https://github.com/Ryujinx/Ryujinx/pull/1433 for details.
diff --git a/Ryujinx.Tests.Unicorn/libs/linux/libunicorn.so b/Ryujinx.Tests.Unicorn/libs/linux/libunicorn.so
new file mode 100644
index 00000000..8d0948af
--- /dev/null
+++ b/Ryujinx.Tests.Unicorn/libs/linux/libunicorn.so
Binary files differ
diff --git a/Ryujinx.Tests.Unicorn/libs/linux/unicorn_fspcr.patch b/Ryujinx.Tests.Unicorn/libs/linux/unicorn_fspcr.patch
deleted file mode 100644
index 391c2fb6..00000000
--- a/Ryujinx.Tests.Unicorn/libs/linux/unicorn_fspcr.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/qemu/target-arm/unicorn_arm.c b/qemu/target-arm/unicorn_arm.c
-index 5ff9ebb..d4953f4 100644
---- a/qemu/target-arm/unicorn_arm.c
-+++ b/qemu/target-arm/unicorn_arm.c
-@@ -101,6 +101,9 @@ int arm_reg_read(struct uc_struct *uc, unsigned int *regs, void **vals, int coun
- case UC_ARM_REG_FPEXC:
- *(int32_t *)value = ARM_CPU(uc, mycpu)->env.vfp.xregs[ARM_VFP_FPEXC];
- break;
-+ case UC_ARM_REG_FPSCR:
-+ *(int32_t *)value = vfp_get_fpscr(&ARM_CPU(uc, mycpu)->env);
-+ break;
- case UC_ARM_REG_IPSR:
- *(uint32_t *)value = xpsr_read(&ARM_CPU(uc, mycpu)->env) & 0x1ff;
- break;
-@@ -175,6 +178,9 @@ int arm_reg_write(struct uc_struct *uc, unsigned int *regs, void* const* vals, i
- case UC_ARM_REG_FPEXC:
- ARM_CPU(uc, mycpu)->env.vfp.xregs[ARM_VFP_FPEXC] = *(int32_t *)value;
- break;
-+ case UC_ARM_REG_FPSCR:
-+ vfp_set_fpscr(&ARM_CPU(uc, mycpu)->env, *(uint32_t *)value);
-+ break;
- case UC_ARM_REG_IPSR:
- xpsr_write(&ARM_CPU(uc, mycpu)->env, *(uint32_t *)value, 0x1ff);
- break;
diff --git a/Ryujinx.Tests.Unicorn/libs/windows/unicorn.dll b/Ryujinx.Tests.Unicorn/libs/windows/unicorn.dll
index 146628e1..1c84586e 100644
--- a/Ryujinx.Tests.Unicorn/libs/windows/unicorn.dll
+++ b/Ryujinx.Tests.Unicorn/libs/windows/unicorn.dll
Binary files differ