mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-25 20:29:08 +02:00
[compat] Solaris build fixes for openssl, catch2; NetBSD build fixes (#2752)
Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2752 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
1c90b099d3
commit
3e8fe622a7
22 changed files with 247 additions and 100 deletions
|
|
@ -12,7 +12,22 @@
|
|||
# include <ucontext.h>
|
||||
# endif
|
||||
# ifdef __sun__
|
||||
// Thanks C macros for exisitng in Solaris headers, thanks a lot
|
||||
// We really needed to define FOR EVERY SINGLE REGISTER didn't we?
|
||||
# include <sys/regset.h>
|
||||
# undef EAX
|
||||
# undef EBX
|
||||
# undef ECX
|
||||
# undef EDX
|
||||
# undef ESP
|
||||
# undef EBP
|
||||
# undef ESI
|
||||
# undef EDI
|
||||
# undef ERR
|
||||
# undef SS
|
||||
# undef CS
|
||||
# undef ES
|
||||
# undef DS
|
||||
# endif
|
||||
# ifdef __linux__
|
||||
# include <sys/syscall.h>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
|
@ -13,10 +16,10 @@ namespace Dynarmic {
|
|||
using const_pointer = const value_type*;
|
||||
using reference = value_type&;
|
||||
using const_reference = const value_type&;
|
||||
using iterator = std::deque<value_type>::iterator;
|
||||
using const_iterator = std::deque<value_type>::const_iterator;
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
using iterator = typename std::deque<value_type>::iterator;
|
||||
using const_iterator = typename std::deque<value_type>::const_iterator;
|
||||
using reverse_iterator = typename std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = typename std::reverse_iterator<const_iterator>;
|
||||
|
||||
inline bool empty() const noexcept { return list.empty(); }
|
||||
inline size_type size() const noexcept { return list.size(); }
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ static void ConstantMemoryReads(IR::Block& block, A32::UserCallbacks* cb) {
|
|||
}
|
||||
|
||||
static void FlagsPass(IR::Block& block) {
|
||||
using Iterator = std::reverse_iterator<IR::Block::iterator>;
|
||||
using Iterator = typename std::reverse_iterator<IR::Block::iterator>;
|
||||
|
||||
struct FlagInfo {
|
||||
bool set_not_required = false;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,25 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#ifdef __AVX__
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
||||
// NetBSD apparently still needs these... ugh
|
||||
#ifdef __cpp_lib_bit_cast
|
||||
#include <bit>
|
||||
template <typename To, typename From> constexpr inline To BitCast(const From& from) {
|
||||
return std::bit_cast<To>(from);
|
||||
}
|
||||
#else
|
||||
template <typename To, typename From> constexpr inline To BitCast(const From& from) {
|
||||
return __builtin_bit_cast(To, from);
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename F>
|
||||
void CheckedRun(F&& fn) {
|
||||
#ifdef __AVX__
|
||||
|
|
@ -32,18 +48,18 @@ void CheckedRun(F&& fn) {
|
|||
, "+x"(xmm8), "+x"(xmm9), "+x"(xmm10), "+x"(xmm11)
|
||||
:
|
||||
);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm0[0]) == 0);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm1[0]) == 1);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm2[0]) == 2);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm3[0]) == 3);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm4[0]) == 4);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm5[0]) == 5);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm6[0]) == 6);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm7[0]) == 7);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm8[0]) == 8);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm9[0]) == 9);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm10[0]) == 10);
|
||||
CHECK(std::bit_cast<std::uint64_t>(xmm11[0]) == 11);
|
||||
CHECK(BitCast<std::uint64_t>(xmm0[0]) == 0);
|
||||
CHECK(BitCast<std::uint64_t>(xmm1[0]) == 1);
|
||||
CHECK(BitCast<std::uint64_t>(xmm2[0]) == 2);
|
||||
CHECK(BitCast<std::uint64_t>(xmm3[0]) == 3);
|
||||
CHECK(BitCast<std::uint64_t>(xmm4[0]) == 4);
|
||||
CHECK(BitCast<std::uint64_t>(xmm5[0]) == 5);
|
||||
CHECK(BitCast<std::uint64_t>(xmm6[0]) == 6);
|
||||
CHECK(BitCast<std::uint64_t>(xmm7[0]) == 7);
|
||||
CHECK(BitCast<std::uint64_t>(xmm8[0]) == 8);
|
||||
CHECK(BitCast<std::uint64_t>(xmm9[0]) == 9);
|
||||
CHECK(BitCast<std::uint64_t>(xmm10[0]) == 10);
|
||||
CHECK(BitCast<std::uint64_t>(xmm11[0]) == 11);
|
||||
#else
|
||||
fn();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue