Fix actions
This commit is contained in:
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -24,12 +24,8 @@ jobs:
|
|||||||
sudo make install
|
sudo make install
|
||||||
- name: Build Kaizen
|
- name: Build Kaizen
|
||||||
run: |
|
run: |
|
||||||
cmake \
|
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
-G Ninja \
|
cmake --build build --config Release
|
||||||
-B build \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-S src
|
|
||||||
ninja -j$(nproc) -C build
|
|
||||||
- name: Collect artifacts
|
- name: Collect artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir upload
|
mkdir upload
|
||||||
@@ -51,7 +47,7 @@ jobs:
|
|||||||
vcpkg install sdl2[vulkan]:x64-windows fmt:x64-windows nlohmann-json:x64-windows mio:x64-windows
|
vcpkg install sdl2[vulkan]:x64-windows fmt:x64-windows nlohmann-json:x64-windows mio:x64-windows
|
||||||
- name: Build Kaizen
|
- name: Build Kaizen
|
||||||
run: |
|
run: |
|
||||||
cmake -B build -T clangcl -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -S src
|
cmake -B build -T clangcl -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build build --config Release
|
cmake --build build --config Release
|
||||||
- name: Collect artifacts
|
- name: Collect artifacts
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -213,9 +213,6 @@ void JIT::b(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond) {
|
|||||||
template void JIT::b<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
template void JIT::b<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
||||||
template void JIT::b<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
template void JIT::b<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
||||||
|
|
||||||
template void JIT::b<Xbyak::Reg64>(u32, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
|
||||||
template void JIT::b<int>(u32, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void JIT::blink(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond) {
|
void JIT::blink(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond) {
|
||||||
s16 imm = instr;
|
s16 imm = instr;
|
||||||
@@ -227,9 +224,6 @@ void JIT::blink(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond con
|
|||||||
template void JIT::blink<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
template void JIT::blink<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
||||||
template void JIT::blink<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
template void JIT::blink<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
||||||
|
|
||||||
template void JIT::blink<Xbyak::Reg64>(u32, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
|
||||||
template void JIT::blink<int>(u32, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void JIT::bl(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond) {
|
void JIT::bl(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond) {
|
||||||
s16 imm = instr;
|
s16 imm = instr;
|
||||||
@@ -239,9 +233,6 @@ void JIT::bl(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond)
|
|||||||
template void JIT::bl<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
template void JIT::bl<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
||||||
template void JIT::bl<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
template void JIT::bl<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
||||||
|
|
||||||
template void JIT::bl<Xbyak::Reg64>(u32, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
|
||||||
template void JIT::bl<int>(u32, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void JIT::bllink(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond) {
|
void JIT::bllink(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond cond) {
|
||||||
mov(rcx, qword[rdi + offsetof(Registers, nextPC)]);
|
mov(rcx, qword[rdi + offsetof(Registers, nextPC)]);
|
||||||
@@ -253,9 +244,6 @@ void JIT::bllink(u32 instr, const Xbyak::Reg64& op1, const T& op2, BranchCond co
|
|||||||
template void JIT::bllink<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
template void JIT::bllink<Xbyak::Reg64>(u32 instr, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
||||||
template void JIT::bllink<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
template void JIT::bllink<int>(u32 instr, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
||||||
|
|
||||||
template void JIT::bllink<Xbyak::Reg64>(u32, const Xbyak::Reg64& op1, const Xbyak::Reg64& op2, BranchCond cond);
|
|
||||||
template void JIT::bllink<int>(u32, const Xbyak::Reg64& op1, const int& op2, BranchCond cond);
|
|
||||||
|
|
||||||
void JIT::lui(u32 instr) {
|
void JIT::lui(u32 instr) {
|
||||||
u64 val = s64(s16(instr));
|
u64 val = s64(s16(instr));
|
||||||
val <<= 16;
|
val <<= 16;
|
||||||
|
|||||||
@@ -153,6 +153,24 @@ FORCE_INLINE void SetFPUCauseCVTRaised(Registers& regs, int raised) {
|
|||||||
SetFPUCauseRaised(regs, raised);
|
SetFPUCauseRaised(regs, raised);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define F_TO_U32(f) (*((u32*)(&(f))))
|
||||||
|
#define D_TO_U64(d) (*((u64*)(&(d))))
|
||||||
|
#define U64_TO_D(d) (*((double*)(&(d))))
|
||||||
|
#define U32_TO_F(f) (*((float*)(&(f))))
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
FORCE_INLINE bool isqnan(T f) {
|
||||||
|
if constexpr(std::is_same_v<T, float>) {
|
||||||
|
u32 v = F_TO_U32(f);
|
||||||
|
return (v & 0x7FC00000) == 0x7FC00000;
|
||||||
|
} else if constexpr(std::is_same_v<T, double>) {
|
||||||
|
u64 v = D_TO_U64(f);
|
||||||
|
return (v & 0x7FF8000000000000) == 0x7FF8000000000000;
|
||||||
|
} else {
|
||||||
|
Util::panic("Invalid float type in isqnan");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
FORCE_INLINE void SetCauseByArg(Registers& regs, T f) {
|
FORCE_INLINE void SetCauseByArg(Registers& regs, T f) {
|
||||||
int c = std::fpclassify(f);
|
int c = std::fpclassify(f);
|
||||||
@@ -176,11 +194,6 @@ FORCE_INLINE void SetCauseByArg(Registers& regs, T f) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define F_TO_U32(f) (*((u32*)(&(f))))
|
|
||||||
#define D_TO_U64(d) (*((u64*)(&(d))))
|
|
||||||
#define U64_TO_D(d) (*((double*)(&(d))))
|
|
||||||
#define U32_TO_F(f) (*((float*)(&(f))))
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
FORCE_INLINE void SetCauseOnResult(Registers& regs, T& d) {
|
FORCE_INLINE void SetCauseOnResult(Registers& regs, T& d) {
|
||||||
Cop1& cop1 = regs.cop1;
|
Cop1& cop1 = regs.cop1;
|
||||||
@@ -254,19 +267,6 @@ FORCE_INLINE bool isnan(T f) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
FORCE_INLINE bool isqnan(T f) {
|
|
||||||
if constexpr(std::is_same_v<T, float>) {
|
|
||||||
u32 v = F_TO_U32(f);
|
|
||||||
return (v & 0x7FC00000) == 0x7FC00000;
|
|
||||||
} else if constexpr(std::is_same_v<T, double>) {
|
|
||||||
u64 v = D_TO_U64(f);
|
|
||||||
return (v & 0x7FF8000000000000) == 0x7FF8000000000000;
|
|
||||||
} else {
|
|
||||||
Util::panic("Invalid float type in isqnan");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define checknanregs(fs, ft) do { \
|
#define checknanregs(fs, ft) do { \
|
||||||
if(isnan(fs) || isnan(ft)) { \
|
if(isnan(fs) || isnan(ft)) { \
|
||||||
regs.cop1.fcr31.cause_invalid_operation = true; \
|
regs.cop1.fcr31.cause_invalid_operation = true; \
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
#include <Language.hpp>
|
|
||||||
|
|
||||||
namespace Language {
|
|
||||||
void SetLanguage(std::map<StringID, const char*>& lang, int selectedLang) {
|
|
||||||
switch (selectedLang) {
|
|
||||||
case AvailableLangs::ENGLISH: lang = english; break;
|
|
||||||
case AvailableLangs::ITALIAN: lang = italian; break;
|
|
||||||
default: Util::panic("Language not supported, index {}\n", selectedLang);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -83,5 +83,11 @@ static const std::array<const char*, AVAILABLE_LANGS_COUNT> languages = {
|
|||||||
"Italiano"
|
"Italiano"
|
||||||
};
|
};
|
||||||
|
|
||||||
void SetLanguage(std::map<StringID, const char*>& lang, int selectedLang);
|
static FORCE_INLINE void SetLanguage(std::map<StringID, const char*>& lang, int selectedLang) {
|
||||||
|
switch (selectedLang) {
|
||||||
|
case AvailableLangs::ENGLISH: lang = english; break;
|
||||||
|
case AvailableLangs::ITALIAN: lang = italian; break;
|
||||||
|
default: Util::panic("Language not supported, index {}\n", selectedLang);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user