mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-29 18:08:08 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 710d1a3b04 | |||
| 3f15be0d22 | |||
| dca2803d56 | |||
| 7fb80fdff7 | |||
| f6c2c0e75a | |||
| 052d2fe828 | |||
| f9d20c14e3 | |||
| 421838a417 |
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -79,7 +79,7 @@ Certain other dependencies will be fetched by CPM regardless. System packages *c
|
|||||||
|
|
||||||
On amd64:
|
On amd64:
|
||||||
|
|
||||||
* [xbyak](https://github.com/herumi/xbyak) - 7.22 or earlier is recommended
|
* [xbyak](https://github.com/herumi/xbyak) - 7.35.2+
|
||||||
|
|
||||||
On aarch64 OR if `DYNARMIC_TESTS` is on:
|
On aarch64 OR if `DYNARMIC_TESTS` is on:
|
||||||
|
|
||||||
@@ -161,11 +161,12 @@ sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glsl
|
|||||||
<summary>Ubuntu, Debian, Mint Linux</summary>
|
<summary>Ubuntu, Debian, Mint Linux</summary>
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install autoconf cmake g++ gcc git glslang-tools libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev qt6-tools-dev qt6-charts-dev libvulkan-dev spirv-tools spirv-headers libusb-1.0-0-dev libxbyak-dev libboost-dev libboost-fiber-dev libboost-context-dev libsdl2-dev libopus-dev libasound2t64 vulkan-utility-libraries-dev
|
sudo apt-get install autoconf cmake g++ gcc git glslang-tools libglu1-mesa-dev libhidapi-dev libpulse-dev libtool libudev-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 mesa-common-dev nasm ninja-build qt6-base-private-dev catch2 libfmt-dev liblz4-dev nlohmann-json3-dev libzstd-dev libssl-dev libavfilter-dev libavcodec-dev libswscale-dev pkg-config zlib1g-dev libva-dev libvdpau-dev qt6-tools-dev qt6-charts-dev libvulkan-dev spirv-tools spirv-headers libusb-1.0-0-dev libboost-dev libboost-fiber-dev libboost-context-dev libsdl2-dev libopus-dev libasound2t64 vulkan-utility-libraries-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
* Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required.
|
* Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required.
|
||||||
* To enable QT Web Engine, add `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake.
|
* To enable QT Web Engine, add `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake.
|
||||||
|
* `libxbyak-dev` is optional for x86_64 targets
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-2
@@ -58,8 +58,13 @@
|
|||||||
"package": "xbyak",
|
"package": "xbyak",
|
||||||
"repo": "herumi/xbyak",
|
"repo": "herumi/xbyak",
|
||||||
"tag": "v%VERSION%",
|
"tag": "v%VERSION%",
|
||||||
"hash": "b6475276b2faaeb315734ea8f4f8bd87ededcee768961b39679bee547e7f3e98884d8b7851e176d861dab30a80a76e6ea302f8c111483607dde969b4797ea95a",
|
"hash": "d93971cc8f17f20818e36099aa862d15d30b60f17c7dff0cc8b7ac89ad6dc6453256dd47a454904666a85cea6ca27f9867f782c7b2c6d0c16039af8e3e28e6cc",
|
||||||
"git_version": "7.35.2"
|
"git_version": "7.35.4",
|
||||||
|
"bundled": true,
|
||||||
|
"skip_updates": true,
|
||||||
|
"patches": [
|
||||||
|
"0001-rvalue-optimize.patch"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"oaknut": {
|
"oaknut": {
|
||||||
"repo": "eden-emulator/oaknut",
|
"repo": "eden-emulator/oaknut",
|
||||||
|
|||||||
@@ -367,7 +367,6 @@ if (BOOST_NO_HEADERS)
|
|||||||
else()
|
else()
|
||||||
target_link_libraries(dynarmic PRIVATE Boost::headers)
|
target_link_libraries(dynarmic PRIVATE Boost::headers)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DYNARMIC_USE_LLVM)
|
if (DYNARMIC_USE_LLVM)
|
||||||
target_include_directories(dynarmic PRIVATE ${LLVM_INCLUDE_DIRS})
|
target_include_directories(dynarmic PRIVATE ${LLVM_INCLUDE_DIRS})
|
||||||
target_compile_definitions(dynarmic PRIVATE DYNARMIC_USE_LLVM=1 ${LLVM_DEFINITIONS})
|
target_compile_definitions(dynarmic PRIVATE DYNARMIC_USE_LLVM=1 ${LLVM_DEFINITIONS})
|
||||||
@@ -385,4 +384,7 @@ endif()
|
|||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
target_compile_definitions(dynarmic PRIVATE FMT_USE_WINDOWS_H=0)
|
target_compile_definitions(dynarmic PRIVATE FMT_USE_WINDOWS_H=0)
|
||||||
endif()
|
endif()
|
||||||
|
if (NOT DEFINED xbyak_ADDED)
|
||||||
|
target_compile_definitions(dynarmic PRIVATE XBYAK_BUNDLED=1)
|
||||||
|
endif()
|
||||||
target_compile_definitions(dynarmic PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
target_compile_definitions(dynarmic PRIVATE FMT_USE_USER_DEFINED_LITERALS=1)
|
||||||
|
|||||||
@@ -519,10 +519,6 @@ void BlockOfCode::LoadRequiredFlagsForCondFromRax(IR::Cond cond) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Xbyak::Address BlockOfCode::Const(const Xbyak::AddressFrame& frame, u64 lower, u64 upper) {
|
|
||||||
return constant_pool.GetConstant(frame, lower, upper);
|
|
||||||
}
|
|
||||||
|
|
||||||
CodePtr BlockOfCode::GetCodeBegin() const {
|
CodePtr BlockOfCode::GetCodeBegin() const {
|
||||||
return code_begin;
|
return code_begin;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "dynarmic/common/cast_util.h"
|
#include "dynarmic/common/cast_util.h"
|
||||||
#include "dynarmic/interface/halt_reason.h"
|
#include "dynarmic/interface/halt_reason.h"
|
||||||
#include "dynarmic/ir/cond.h"
|
#include "dynarmic/ir/cond.h"
|
||||||
|
#include "xbyak/xbyak.h"
|
||||||
|
|
||||||
namespace Dynarmic::Backend::X64 {
|
namespace Dynarmic::Backend::X64 {
|
||||||
|
|
||||||
@@ -101,8 +102,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Code emitter: Calls the lambda. Lambda must not have any captures.
|
/// Code emitter: Calls the lambda. Lambda must not have any captures.
|
||||||
template<typename Lambda>
|
template<typename F>
|
||||||
void CallLambda(Lambda l) {
|
void CallLambda(F l) {
|
||||||
CallFunction(Common::FptrCast(l));
|
CallFunction(Common::FptrCast(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,22 +125,35 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Xbyak::Address Const(const Xbyak::AddressFrame& frame, u64 lower, u64 upper = 0);
|
// Xbyak benefits slightly from not having & references on some of its ctors, however one main
|
||||||
|
// disadvantage is that this breaks ABI slightly because we need to hijack the main privated ctor, hence
|
||||||
template<size_t esize>
|
// we define two paths, one for gentoo (non bundled) and one for our custom bundled set with patch
|
||||||
Xbyak::Address BConst(const Xbyak::AddressFrame& frame, u64 value) {
|
#ifdef XBYAK_BUNDLED
|
||||||
return Const(frame, mcl::bit::replicate_element<u64>(esize, value),
|
[[nodiscard]] Xbyak::Address Const(const Xbyak::AddressFrame frame, u64 lower, u64 upper = 0) {
|
||||||
mcl::bit::replicate_element<u64>(esize, value));
|
return constant_pool.GetConstant(Xbyak::AddressFrame(frame.bit_, frame.broadcast_), lower, upper);
|
||||||
}
|
}
|
||||||
|
template<size_t esize>
|
||||||
|
[[nodiscard]] Xbyak::Address BConst(const Xbyak::AddressFrame frame, u64 value) {
|
||||||
|
return Const(Xbyak::AddressFrame(frame.bit_, frame.broadcast_), mcl::bit::replicate_element<u64>(esize, value), mcl::bit::replicate_element<u64>(esize, value));
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
[[nodiscard]] Xbyak::Address Const(const Xbyak::AddressFrame& frame, u64 lower, u64 upper = 0) {
|
||||||
|
return constant_pool.GetConstant(frame, lower, upper);
|
||||||
|
}
|
||||||
|
template<size_t esize>
|
||||||
|
[[nodiscard]] Xbyak::Address BConst(const Xbyak::AddressFrame& frame, u64 value) {
|
||||||
|
return Const(frame, mcl::bit::replicate_element<u64>(esize, value), mcl::bit::replicate_element<u64>(esize, value));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
CodePtr GetCodeBegin() const;
|
CodePtr GetCodeBegin() const;
|
||||||
size_t GetTotalCodeSize() const;
|
size_t GetTotalCodeSize() const;
|
||||||
|
|
||||||
const void* GetReturnFromRunCodeAddress() const {
|
[[nodiscard]] const void* GetReturnFromRunCodeAddress() const {
|
||||||
return return_from_run_code[0];
|
return return_from_run_code[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
const void* GetForceReturnFromRunCodeAddress() const {
|
[[nodiscard]] const void* GetForceReturnFromRunCodeAddress() const {
|
||||||
return return_from_run_code[FORCE_RETURN];
|
return return_from_run_code[FORCE_RETURN];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ ConstantPool::ConstantPool(BlockOfCode& code, size_t size)
|
|||||||
reinterpret_cast<ConstantT*>(code.AllocateFromCodeSpace(size)), size / align_size);
|
reinterpret_cast<ConstantT*>(code.AllocateFromCodeSpace(size)), size / align_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XBYAK_BUNDLED
|
||||||
|
Xbyak::Address ConstantPool::GetConstant(const Xbyak::AddressFrame frame, u64 lower, u64 upper) {
|
||||||
|
#else
|
||||||
Xbyak::Address ConstantPool::GetConstant(const Xbyak::AddressFrame& frame, u64 lower, u64 upper) {
|
Xbyak::Address ConstantPool::GetConstant(const Xbyak::AddressFrame& frame, u64 lower, u64 upper) {
|
||||||
|
#endif
|
||||||
const auto constant = ConstantT(lower, upper);
|
const auto constant = ConstantT(lower, upper);
|
||||||
auto iter = constant_info.find(constant);
|
auto iter = constant_info.find(constant);
|
||||||
if (iter == constant_info.end()) {
|
if (iter == constant_info.end()) {
|
||||||
|
|||||||
@@ -29,7 +29,11 @@ class ConstantPool final {
|
|||||||
public:
|
public:
|
||||||
ConstantPool(BlockOfCode& code, size_t size);
|
ConstantPool(BlockOfCode& code, size_t size);
|
||||||
|
|
||||||
|
#ifdef XBYAK_BUNDLED
|
||||||
|
Xbyak::Address GetConstant(const Xbyak::AddressFrame frame, u64 lower, u64 upper = 0);
|
||||||
|
#else
|
||||||
Xbyak::Address GetConstant(const Xbyak::AddressFrame& frame, u64 lower, u64 upper = 0);
|
Xbyak::Address GetConstant(const Xbyak::AddressFrame& frame, u64 lower, u64 upper = 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr size_t align_size = 16; // bytes
|
static constexpr size_t align_size = 16; // bytes
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
/* This file is part of the dynarmic project.
|
/* This file is part of the dynarmic project.
|
||||||
@@ -595,7 +595,8 @@ void EmitX64::EmitPackedHalvingSubAddS16(EmitContext& ctx, IR::Inst* inst) {
|
|||||||
EmitPackedSubAdd(code, ctx, inst, false, true, true);
|
EmitPackedSubAdd(code, ctx, inst, false, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void EmitPackedOperation(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst, void (Xbyak::CodeGenerator::*fn)(const Xbyak::Mmx& mmx, const Xbyak::Operand&)) {
|
template<typename F>
|
||||||
|
static void EmitPackedOperation(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst, F&& fn) {
|
||||||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
|
|
||||||
const Xbyak::Xmm xmm_a = ctx.reg_alloc.UseScratchXmm(code, args[0]);
|
const Xbyak::Xmm xmm_a = ctx.reg_alloc.UseScratchXmm(code, args[0]);
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ using namespace Xbyak::util;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void EmitVectorSaturatedNative(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst, void (Xbyak::CodeGenerator::*saturated_fn)(const Xbyak::Mmx& mmx, const Xbyak::Operand&), void (Xbyak::CodeGenerator::*unsaturated_fn)(const Xbyak::Mmx& mmx, const Xbyak::Operand&), void (Xbyak::CodeGenerator::*sub_fn)(const Xbyak::Mmx& mmx, const Xbyak::Operand&)) {
|
template<typename F1, typename F2, typename F3>
|
||||||
|
static void EmitVectorSaturatedNative(BlockOfCode& code, EmitContext& ctx, IR::Inst* inst, F1&& saturated_fn, F2&& unsaturated_fn, F3&& sub_fn) {
|
||||||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
|
|
||||||
const Xbyak::Xmm result = ctx.reg_alloc.UseScratchXmm(code, args[0]);
|
const Xbyak::Xmm result = ctx.reg_alloc.UseScratchXmm(code, args[0]);
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <xbyak/xbyak.h>
|
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "dynarmic/backend/x64/xbyak.h"
|
#include "dynarmic/backend/x64/xbyak.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user