git: f566363797bc - main - emulators/yuzu: unbreak runtime after c758d1cbfc42

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 03 May 2025 16:54:26 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f566363797bc97c3c405f969da26879d2806c586

commit f566363797bc97c3c405f969da26879d2806c586
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2025-05-03 16:18:06 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2025-05-03 16:54:18 +0000

    emulators/yuzu: unbreak runtime after c758d1cbfc42
    
    Bundle xbyak like emulators/citra as dynarmic upstream is gone.
    
    $ yuzu
    <select game>
    Abort trap
    (lldb) bt
    * thread #22, name = 'CPUCore_0', stop reason = signal SIGABRT
      * frame #0: 0x0000000840e0b27a libc.so.7`__sys_thr_kill at thr_kill.S:4
        frame #1: 0x0000000840d85284 libc.so.7`__raise(s=6) at raise.c:50:10
        frame #2: 0x0000000840e35009 libc.so.7`abort at abort.c:65:8
        frame #3: 0x000000083e6dfc07 libcxxrt.so.1`report_failure(err=<unavailable>, thrown_exception=0x000013e856697280) at exception.cc:734:5
        frame #4: 0x0000000002e6bfd1 yuzu`Xbyak::CodeGenerator::opMR(this=0x000013e85af00b10, addr=0x000013ea4f1fe718, r=0x000013ea4f1feb38, type=0, code=136, type2=0, code2=136) at xbyak.h:2100:109
        frame #5: 0x0000000002e71d11 yuzu`Xbyak::CodeGenerator::opRO(this=0x000013e85af00b10, r=0x000013ea4f1feb38, op=0x000013ea4f1feb40, type=0, code=136, condR=false, immSize=0) at xbyak.h:2312:4
        frame #6: 0x0000000002e72047 yuzu`Xbyak::CodeGenerator::opRO_MR(this=0x000013e85af00b10, op1=0x000013ea4f1feb40, op2=0x000013ea4f1feb38, code=136) at xbyak.h:2339:4
        frame #7: 0x0000000002e67193 yuzu`Xbyak::CodeGenerator::mov(this=0x000013e85af00b10, op1=0x000013ea4f1feb40, op2=0x000013ea4f1feb38) at xbyak.h:3038:4
        frame #8: 0x0000000002f0b3fe yuzu`Dynarmic::Backend::X64::RegAlloc::EmitMove(this=0x000013ea4f1ff500, bit_width=64, to=FirstSpill, from=RAX) at reg_alloc.cpp:748:18
        frame #9: 0x0000000002f09074 yuzu`Dynarmic::Backend::X64::RegAlloc::Move(this=0x000013ea4f1ff500, to=FirstSpill, from=RAX) at reg_alloc.cpp:610:5
        frame #10: 0x0000000002f0bc80 yuzu`Dynarmic::Backend::X64::RegAlloc::SpillRegister(this=0x000013ea4f1ff500, loc=RAX) at reg_alloc.cpp:654:5
        frame #11: 0x0000000002f08f8f yuzu`Dynarmic::Backend::X64::RegAlloc::MoveOutOfTheWay(this=0x000013ea4f1ff500, reg=RAX) at reg_alloc.cpp:644:9
        frame #12: 0x0000000002f086b0 yuzu`Dynarmic::Backend::X64::RegAlloc::ScratchImpl(this=0x000013ea4f1ff500, desired_locations=size=1) at reg_alloc.cpp:428:5
        frame #13: 0x0000000002f0872d yuzu`Dynarmic::Backend::X64::RegAlloc::ScratchGpr(this=0x000013ea4f1ff500, desired_location=RAX) at reg_alloc.cpp:356:27
        frame #14: 0x0000000002f68a08 yuzu`Dynarmic::Backend::X64::DoNZCV(code=0x000013e85af00b10, reg_alloc=0x000013ea4f1ff500, nzcv_out=0x000013e856611d10) at emit_x64_data_processing.cpp:914:41
        frame #15: 0x0000000002f63b48 yuzu`Dynarmic::Backend::X64::EmitSub(code=0x000013e85af00b10, ctx=0x000013ea4f1ff488, inst=0x000013e856611ca8, bitsize=64) at emit_x64_data_processing.cpp:1027:31
        frame #16: 0x0000000002f641be yuzu`Dynarmic::Backend::X64::EmitX64::EmitSub64(this=0x000013e85af01968, ctx=0x000013ea4f1ff488, inst=0x000013e856611ca8) at emit_x64_data_processing.cpp:1106:5
        frame #17: 0x0000000003542e24 yuzu`Dynarmic::Backend::X64::A64EmitX64::Emit(this=0x000013e85af01968, block=0x000013ea4f1ff730) at opcodes.inc:131:1
        frame #18: 0x000000000353e209 yuzu`Dynarmic::A64::Jit::Impl::GetBlock(this=0x000013e85af006c0, current_location=(value = 2147483656)) at a64_interface.cpp:290:24
        frame #19: 0x000000000353de9a yuzu`Dynarmic::A64::Jit::Impl::GetCurrentBlock(this=0x000013e85af006c0) at a64_interface.cpp:252:16
        frame #20: 0x000000000354057d yuzu`Dynarmic::A64::Jit::Impl::GetCurrentBlockThunk(thisptr=0x000013e85af006c0) at a64_interface.cpp:244:23
    
    Regressed by:   https://github.com/herumi/xbyak/commit/54173384271f
    Reported by:    SDK Chan
---
 emulators/yuzu/Makefile           |  4 ++--
 emulators/yuzu/distinfo           |  2 ++
 emulators/yuzu/files/patch-xbyak7 | 26 --------------------------
 3 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/emulators/yuzu/Makefile b/emulators/yuzu/Makefile
index a1c2f7c8368e..1a0d0950ed00 100644
--- a/emulators/yuzu/Makefile
+++ b/emulators/yuzu/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	yuzu
 PORTVERSION=	s20240301
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	emulators wayland
 .if make(makesum)
 MASTER_SITES=	https://api.yuzu-emu.org/gamedb/?dummy=/:gamedb
@@ -31,7 +31,6 @@ DEPRECATED=	Project discontinued
 BUILD_DEPENDS=	boost-libs>0:devel/boost-libs \
 		nlohmann-json>0:devel/nlohmann-json \
 		simpleini>0:devel/simpleini \
-		xbyak>0:devel/xbyak \
 		glslangValidator:graphics/glslang \
 		vulkan-headers>0:graphics/vulkan-headers \
 		vulkan-utility-libraries>0:graphics/vulkan-utility-libraries
@@ -62,6 +61,7 @@ GH_TUPLE=	yuzu-mirror:mbedtls:v2.16.9-115-g8c88150ca:mbedtls/externals/mbedtls \
 		arun11299:cpp-jwt:v1.4-18-g10ef573:cpp_jwt/externals/cpp-jwt \
 		arsenm:sanitizers-cmake:aab6948:sanitizers_cmake/externals/cubeb/cmake/sanitizers-cmake \
 		eggert:tz:2022g-11-g16ce126a:tz/externals/nx_tzdb/tzdb_to_nx/externals/tz/tz \
+		herumi:xbyak:v6.68:xbyak/externals/xbyak \
 		kinetiknz:cubeb:cubeb-0.2-1452-g48689ae:cubeb/externals/cubeb \
 		lat9nq:tzdb_to_nx:221202-15-g9792969:tzdb_to_nx/externals/nx_tzdb/tzdb_to_nx \
 		yhirose:cpp-httplib:v0.14.1:cpp_httplib/externals/cpp-httplib
diff --git a/emulators/yuzu/distinfo b/emulators/yuzu/distinfo
index 426abfe00019..87a72a80d142 100644
--- a/emulators/yuzu/distinfo
+++ b/emulators/yuzu/distinfo
@@ -21,6 +21,8 @@ SHA256 (arsenm-sanitizers-cmake-aab6948_GH0.tar.gz) = d9009e17948aff769a6f6e16b5
 SIZE (arsenm-sanitizers-cmake-aab6948_GH0.tar.gz) = 7240
 SHA256 (eggert-tz-2022g-11-g16ce126a_GH0.tar.gz) = 1d1a5d867053ea55f526cb76f18c8fb8ae710188e9db2732fd85f8a557110e46
 SIZE (eggert-tz-2022g-11-g16ce126a_GH0.tar.gz) = 594209
+SHA256 (herumi-xbyak-v6.68_GH0.tar.gz) = 6d36761741e69c4f7c92278537b21e39ecbde595508af14eb4b21b7d36d1e21a
+SIZE (herumi-xbyak-v6.68_GH0.tar.gz) = 249326
 SHA256 (kinetiknz-cubeb-cubeb-0.2-1452-g48689ae_GH0.tar.gz) = c0f83a493f1d54a92e16baf56f27813ff294ce78bc42fbcc3935580852a624de
 SIZE (kinetiknz-cubeb-cubeb-0.2-1452-g48689ae_GH0.tar.gz) = 228346
 SHA256 (lat9nq-tzdb_to_nx-221202-15-g9792969_GH0.tar.gz) = b661401eda279d0a3d43c3df87efe6f408694d9710b031e98efb732999599eed
diff --git a/emulators/yuzu/files/patch-xbyak7 b/emulators/yuzu/files/patch-xbyak7
deleted file mode 100644
index 55ee08d293b0..000000000000
--- a/emulators/yuzu/files/patch-xbyak7
+++ /dev/null
@@ -1,26 +0,0 @@
-CMake Warning at CMakeLists.txt:313 (find_package):
-  Could not find a configuration file for package "xbyak" that is compatible
-  with requested version "6".
-
-  The following configuration files were considered but not accepted:
-
-    /usr/local/lib/cmake/xbyak/xbyak-config.cmake, version: 7.0
-
-CMake Error at externals/CMakeLists.txt:19 (add_subdirectory):
-  The source directory
-
-    externals/xbyak
-
-  does not contain a CMakeLists.txt file.
-
---- CMakeLists.txt.orig	2023-12-04 02:59:11 UTC
-+++ CMakeLists.txt
-@@ -310,7 +310,7 @@
- endif()
- 
- if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
--    find_package(xbyak 6 CONFIG)
-+    find_package(xbyak CONFIG)
- endif()
- 
- if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)