From nobody Mon Jun 27 07:10:26 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B809D86979E; Mon, 27 Jun 2022 07:10:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LWf4y3Hqkz4VDD; Mon, 27 Jun 2022 07:10:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656313826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EBZ4MIqpGgnpH2YTQC+eBajBRTCCUlGBxMkt78GERyw=; b=MwywUOTZTj6ccZBE0bfPp+pXBMGwfCd7snNHSXa7PJY5lnZG6pTx+fb0cRKiBc8oTuOJsa JhMlPjgMLTYNCtqcFrcE4BY3Nh2VAd329mutasviGP4Dwx0HBdgcCFOAnXoasnKGNJ08a0 EKjamK/LrnF+Me0oIYabNlMdV/LtRgCJ8yVX0hR0sJbtg9w+aDkOq/94LeLyIihrCTDXKC 6fBENdkx4n3qPMz5zC5/6Il53scS4nwYja1tWvqR74aOEDVbXjEv3agwSQFO+n+LqCVl3O 6N6J9A4l5t98cxhrg9RUbOZiFt8sx+Fiwf14QfOA26Y41ArHYPWVzkMKsjT6JA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 429FE23ABE; Mon, 27 Jun 2022 07:10:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25R7AQhq006419; Mon, 27 Jun 2022 07:10:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25R7AQcY006418; Mon, 27 Jun 2022 07:10:26 GMT (envelope-from git) Date: Mon, 27 Jun 2022 07:10:26 GMT Message-Id: <202206270710.25R7AQcY006418@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 98bb3ae46e2e - main - emulators/libretro-reicast: Fix 32-bit / i386 build List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98bb3ae46e2e6a4da0c039fbf4e1d28b3fdd1de8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656313826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EBZ4MIqpGgnpH2YTQC+eBajBRTCCUlGBxMkt78GERyw=; b=evkLHawlHqlz7WHp2x1RW6/ToO4e+EyW8VwWKCytOGH2gkNcxrn2Zub5gdAnkmoxl078Lo ok8+mhM4KP1wpFY0IWVtKioNParOIaR0/VjIQypuyJ/QE3v5gGYyBPWIxM5MY6+fZvd+Ou mbWDchaSaU/HC0KDR8FNdUHs7N3/ksCnF2XIFyGdGKObRHis/Qc6mHugONvh0KMmuFw8DQ NW/FMygerLTXNvE05XrHBdi6uhMKUuS7ZozaeKwEeEsOGLH13TXt3cbKdom7eOXH6WCQml pwoL25dHqh93s7jKlrFYUf4ZRWvByJTDgxbyHs9iEXEbGDtFCsyCKUAGYoNvGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656313826; a=rsa-sha256; cv=none; b=a/gN5dY9iVt0QHpC9STiQUktDpG4+JBWwfFMb6gwUFUAJr32IyQP/pZwi4v4mP4/8MBMB/ HxZiBJJgAMPGUqOXes9tzkkzss7VWTYzMrfzuWPeyyPeYSL5n07MFdV+jR+wWiWZUo8Nri 0wgQLr/TrD8/m5Q6JmGf4qDn9ug4z6t0KMoHIxcqapzljSdLVqCOv6mx4HMldErXOt00gS tbpF/RFA0FF37TMH/H/kWl/sce9PIJnfm+j34NjcZWP1C2KdeWlvIRSRGhNepCc+M1MsCu TXfT94FwVHX0d0wckvSksGvSzFoH7SDCtDApUuuURK4GhdelFkCNUOqa6YmYvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=98bb3ae46e2e6a4da0c039fbf4e1d28b3fdd1de8 commit 98bb3ae46e2e6a4da0c039fbf4e1d28b3fdd1de8 Author: Timothy Beyer AuthorDate: 2022-06-27 07:08:18 +0000 Commit: Li-Wen Hsu CommitDate: 2022-06-27 07:08:18 +0000 emulators/libretro-reicast: Fix 32-bit / i386 build PR: 264216 --- emulators/libretro-reicast/Makefile | 7 +- ...patch-libswirl_hw_arm7_arm7__jit__virt__x86.cpp | 109 +++++++++++++++++++++ 2 files changed, 113 insertions(+), 3 deletions(-) diff --git a/emulators/libretro-reicast/Makefile b/emulators/libretro-reicast/Makefile index a5e090211451..10e8667810ed 100644 --- a/emulators/libretro-reicast/Makefile +++ b/emulators/libretro-reicast/Makefile @@ -2,6 +2,7 @@ PORTNAME= libretro-reicast PORTVERSION= 0.20201231 +PORTREVISION= 1 CATEGORIES= emulators games MAINTAINER= beyert@cs.ucr.edu @@ -18,7 +19,7 @@ LIB_DEPENDS= libao.so:audio/libao \ libpulse.so:audio/pulseaudio \ libudev.so:devel/libudev-devd -USES= cmake compiler gl xorg +USES= cmake compiler gl xorg USE_GCC= yes USE_LDCONFIG= yes @@ -34,12 +35,12 @@ GH_ACCOUNT= reicast GH_PROJECT= reicast-emulator GH_TAGNAME= 0bd6ea3 -USE_GL= egl gbm gl +USE_GL= egl gbm gl PLIST_FILES= lib/libretro/reicast_libretro.so do-install: - ${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro; + @${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro; ${INSTALL_LIB} ${WRKDIR}/.build/libreicast.so \ ${STAGEDIR}/${PREFIX}/lib/libretro/reicast_libretro.so; diff --git a/emulators/libretro-reicast/files/patch-libswirl_hw_arm7_arm7__jit__virt__x86.cpp b/emulators/libretro-reicast/files/patch-libswirl_hw_arm7_arm7__jit__virt__x86.cpp new file mode 100644 index 000000000000..f2c04dd29ffa --- /dev/null +++ b/emulators/libretro-reicast/files/patch-libswirl_hw_arm7_arm7__jit__virt__x86.cpp @@ -0,0 +1,109 @@ +--- libswirl/hw/arm7/arm7_jit_virt_x86.cpp.orig 2020-10-18 11:22:48 UTC ++++ libswirl/hw/arm7/arm7_jit_virt_x86.cpp +@@ -13,6 +13,99 @@ + + #if HOST_OS == OS_LINUX || HOST_OS == OS_DARWIN + #include ++ ++#define DP_R_ROFC (OP_READ_FLAGS_S|OP_READ_REG_1) //Reads reg1, op2, flags if S ++#define DP_R_ROF (OP_READ_FLAGS|OP_READ_REG_1) //Reads reg1, op2, flags (ADC & co) ++#define DP_R_OFC (OP_READ_FLAGS_S) //Reads op2, flags if S ++ ++#define DP_W_RFC (OP_WRITE_FLAGS_S|OP_WRITE_REG) //Writes reg, and flags if S ++#define DP_W_F (OP_WRITE_FLAGS) //Writes only flags, always (S=1) ++ ++struct ArmDPOP { ++ u32 key; ++ u32 mask; ++ u32 flags; ++}; ++ ++vector ops; ++ ++void AddDPOP(u32 subcd, u32 rflags, u32 wflags) { ++ ArmDPOP op; ++ ++ u32 key = subcd << 21; ++ u32 mask = (15 << 21) | (7 << 25); ++ ++ op.flags = rflags | wflags; ++ ++ if (wflags == DP_W_F) { ++ //also match S bit for opcodes that must write to flags (CMP & co) ++ mask |= 1 << 20; ++ key |= 1 << 20; ++ } ++ ++ //ISR form (bit 25=0, bit 4 = 0) ++ op.key = key; ++ op.mask = mask | (1 << 4); ++ ops.push_back(op); ++ ++ //RSR form (bit 25=0, bit 4 = 1, bit 7=0) ++ op.key = key | (1 << 4); ++ op.mask = mask | (1 << 4) | (1 << 7); ++ ops.push_back(op); ++ ++ //imm8r4 form (bit 25=1) ++ op.key = key | (1 << 25); ++ op.mask = mask; ++ ops.push_back(op); ++} ++ ++void InitHash() { ++ /* ++ COND | 00 I OP1 S Rn Rd OPER2 -- Data opcode, PSR xfer ++ Data processing opcodes ++ */ ++ ++ //AND 0000 Rn, OPER2, {Flags} Rd, {Flags} ++ //EOR 0001 Rn, OPER2, {Flags} Rd, {Flags} ++ //SUB 0010 Rn, OPER2, {Flags} Rd, {Flags} ++ //RSB 0011 Rn, OPER2, {Flags} Rd, {Flags} ++ //ADD 0100 Rn, OPER2, {Flags} Rd, {Flags} ++ //ORR 1100 Rn, OPER2, {Flags} Rd, {Flags} ++ //BIC 1110 Rn, OPER2, {Flags} Rd, {Flags} ++ AddDPOP(0, DP_R_ROFC, DP_W_RFC); ++ AddDPOP(1, DP_R_ROFC, DP_W_RFC); ++ AddDPOP(2, DP_R_ROFC, DP_W_RFC); ++ AddDPOP(3, DP_R_ROFC, DP_W_RFC); ++ AddDPOP(4, DP_R_ROFC, DP_W_RFC); ++ AddDPOP(12, DP_R_ROFC, DP_W_RFC); ++ AddDPOP(14, DP_R_ROFC, DP_W_RFC); ++ ++ //ADC 0101 Rn, OPER2, Flags Rd, {Flags} ++ //SBC 0110 Rn, OPER2, Flags Rd, {Flags} ++ //RSC 0111 Rn, OPER2, Flags Rd, {Flags} ++ AddDPOP(5, DP_R_ROF, DP_W_RFC); ++ AddDPOP(6, DP_R_ROF, DP_W_RFC); ++ AddDPOP(7, DP_R_ROF, DP_W_RFC); ++ ++ //TST 1000 S=1 Rn, OPER2, Flags Flags ++ //TEQ 1001 S=1 Rn, OPER2, Flags Flags ++ AddDPOP(8, DP_R_ROF, DP_W_F); ++ AddDPOP(9, DP_R_ROF, DP_W_F); ++ ++ //CMP 1010 S=1 Rn, OPER2 Flags ++ //CMN 1011 S=1 Rn, OPER2 Flags ++ AddDPOP(10, DP_R_ROF, DP_W_F); ++ AddDPOP(11, DP_R_ROF, DP_W_F); ++ ++ //MOV 1101 OPER2, {Flags} Rd, {Flags} ++ //MVN 1111 OPER2, {Flags} Rd, {Flags} ++ AddDPOP(13, DP_R_OFC, DP_W_RFC); ++ AddDPOP(15, DP_R_OFC, DP_W_RFC); ++} ++ ++void armt_init() { ++ InitHash(); ++} + #endif + #if HOST_OS == OS_WINDOWS + #include +@@ -455,4 +548,4 @@ struct Arm7VirtBackendX86 : Arm7VirtBackend { + Arm7VirtBackend* Arm7VirtBackend::Create(ARM7Backend* arm, Arm7Context* ctx) { + return new Arm7VirtBackendX86(arm, ctx); + } +-#endif +\ No newline at end of file ++#endif