Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC #80

Merged
merged 43 commits into from Aug 28, 2022
Merged

GCC #80

Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c8c9fad
GCC build
Aug 25, 2022
396eeff
Removed duplicate #endif
Aug 25, 2022
73c3297
Unix path
Aug 26, 2022
aa9f578
Added CemuUtils dependency.
Aug 26, 2022
24a8ea5
Replaced __clang___ with __GNUC__ macro. (clang defines both)
Aug 26, 2022
dff3204
Updated build.sh
Aug 26, 2022
9b112c3
Removed superfluous const
Aug 26, 2022
a4cc56a
Removed build.sh
Aug 26, 2022
c102097
Merge remote-tracking branch 'origin/main' into gcc
Aug 26, 2022
82c1b44
Merge cleanup
Aug 26, 2022
b3e67b8
Removed unnecessary comment
Aug 26, 2022
8011108
gcc
Aug 27, 2022
20afbc6
Fix Compilation in Windows
Aug 27, 2022
e4fc8ce
Merge branch 'cemu-project:main' into gcc
ArtemisX64 Aug 27, 2022
4bc6c01
More linux fixes
Aug 27, 2022
93d7b69
Merge branch 'cemu-project:main' into gcc1
ArtemisX64 Aug 27, 2022
f8da455
Merge pull request #1 from ArtemisX64/gcc1
Aug 27, 2022
fd013c4
Cleanup LatteDecompilerCFInstruction copy and move constructors.
Aug 27, 2022
9810c36
Copy and move constructors for clang-12, clang-14, gcc and msvc
Aug 27, 2022
ad1b38c
Moved _umul128 to precompiled.h
Aug 27, 2022
f33540f
Replaced ALIGN macro with alignas
Aug 27, 2022
73a8e6f
Replaced ASSUME(false) with UNREACHABLE.
Aug 27, 2022
d68d6c4
Replaced POPCNT with std::popcount<unsigned int>
Aug 27, 2022
a6e04e9
Cleanup precompiled.h
Aug 27, 2022
52a7f6f
Update src/Cafe/CMakeLists.txt
Aug 27, 2022
fc407e5
Removed NOINLINE
Aug 28, 2022
3b5eb49
Removed DLLIMPORT
Aug 28, 2022
6408cfd
Replaced _rotr with std::rotr
Aug 28, 2022
cd2b081
Replaced _rotl64 with std::rotl
Aug 28, 2022
71af6e5
Removed redundant #if defined clauses.
Aug 28, 2022
6ec0f16
Updated #error message to reflect removal of DLLIMPORT
Aug 28, 2022
3a0adc3
Undo some early hacking for compiling on linux.
Aug 28, 2022
056ae1f
Undone some early hacking and removed trailing comma.
Aug 28, 2022
43d8ee7
Cleanup blank lines
Aug 28, 2022
f8f7611
Cleanup blank lines
Aug 28, 2022
3d28b5e
Removed unnecessary include
Aug 28, 2022
cbbb970
Cleanup blank lines
Aug 28, 2022
f56fb24
Cleanup EOF newlines
Aug 28, 2022
b1fbe45
Cleanup EOF newlines
Aug 28, 2022
2cf6ebf
Merge branch 'cemu-project:main' into gcc
Aug 28, 2022
3fd66d2
Cleanup blank line
Aug 28, 2022
c1679af
Cleanup EOF newline
Aug 28, 2022
90e28d9
Delete wxCemuhookExports.cpp
Crementif Aug 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies/ih264d/decoder/x86/ih264d_function_selector.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void ih264d_init_function_ptr(dec_struct_t *ps_codec)
}
}

#ifdef __clang__
#ifdef __GNUC__
#include <cpuid.h>

void __cpuid2(signed int* cpuInfo, unsigned int level)
Expand Down
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ elseif(UNIX)
add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
endif()
add_definitions(-fms-extensions)
add_definitions(-fms-compatibility-version=19.14)
add_definitions(-fdelayed-template-parsing)
add_definitions(-fpermissive)
add_definitions(-maes)
# warnings
add_compile_options(-Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -Wno-ambiguous-reversed-operator)
Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/Account/Account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ fs::path Account::GetFileName(uint32 persistent_id)
if (persistent_id < kMinPersistendId)
throw std::invalid_argument(fmt::format("persistent id {:#x} is invalid", persistent_id));

return CemuApp::GetMLCPath(fmt::format(L"usr\\save\\system\\act\\{:08x}\\account.dat", persistent_id)).ToStdWstring();
return CemuApp::GetMLCPath(fmt::format(L"usr/save/system/act/{:08x}/account.dat", persistent_id)).ToStdWstring();
This conversation was marked as resolved.
Show resolved Hide resolved
}

OnlineValidator Account::ValidateOnlineFiles() const
Expand Down
7 changes: 6 additions & 1 deletion src/Cafe/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
project(CemuCafe)

include_directories(".")

if((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
This conversation was marked as resolved.
Show resolved Hide resolved
add_compile_options(-mssse3 -mavx2)
endif()

file(GLOB_RECURSE CPP_FILES *.cpp)
file(GLOB_RECURSE H_FILES *.h)
add_library(CemuCafe ${CPP_FILES} ${H_FILES})


set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

target_precompile_headers(CemuCafe PRIVATE ../Common/precompiled.h)
Expand All @@ -23,7 +29,6 @@ target_link_libraries(CemuCafe glslang SPIRV)
target_link_libraries(CemuCafe ih264d zarchive)
#target_link_libraries(CemuCafe zstd::libzstd_static)


IF(WIN32)
target_link_libraries(CemuCafe iphlpapi)
ENDIF()
2 changes: 1 addition & 1 deletion src/Cafe/CafeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,4 +856,4 @@ namespace CafeSystem
return currentUpdatedApplicationHash;
}

}
}
2 changes: 1 addition & 1 deletion src/Cafe/GameProfile/GameProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,4 @@ void GameProfile::Reset()
// controller settings
for (auto& profile : m_controllerProfile)
profile.reset();
}
}
2 changes: 1 addition & 1 deletion src/Cafe/GraphicPack/GraphicPack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ void graphicPack_activateForCurrentTitle(uint64 titleId)
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/Cafe/GraphicPack/GraphicPack2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1129,4 +1129,4 @@ std::vector<std::pair<MPTR, MPTR>> GraphicPack2::GetActiveRAMMappings()
return a.first < b.first;
});
return v;
}
}
2 changes: 1 addition & 1 deletion src/Cafe/GraphicPack/GraphicPack2.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,4 @@ std::vector<T> GraphicPack2::ParseList(const ExpressionParser& parser, IniParser
}

return result;
}
}
2 changes: 1 addition & 1 deletion src/Cafe/HW/Espresso/Interpreter/PPCInterpreterMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PPCInterpreter_t* PPCInterpreter_getCurrentInstance()
return ppcInterpreterCurrentInstance;
}

__declspec(noinline) uint64 PPCInterpreter_getMainCoreCycleCounter()
NOINLINE uint64 PPCInterpreter_getMainCoreCycleCounter()
This conversation was marked as resolved.
Show resolved Hide resolved
{
return PPCTimer_getFromRDTSC();
}
Expand Down
12 changes: 7 additions & 5 deletions src/Cafe/HW/Espresso/PPCTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@

#if BOOST_OS_LINUX || BOOST_OS_MACOS
static __inline__
unsigned __int64 _umul128(unsigned __int64,
unsigned __int64,
unsigned __int64*);
uint64 _umul128(uint64 multiplier, uint64 multiplicand, uint64 *highProduct) {
This conversation was marked as resolved.
Show resolved Hide resolved
unsigned __int128 x = (unsigned __int128)multiplier * (unsigned __int128)multiplicand;
*highProduct = (x >> 64);
return x & 0xFFFFFFFFFFFFFFFF;
}
#endif

uint64 _rdtscLastMeasure = 0;
Expand Down Expand Up @@ -49,7 +51,7 @@ uint64 PPCTimer_estimateRDTSCFrequency()
forceLog_printf("Invariant TSC not supported");

_mm_mfence();
unsigned __int64 tscStart = __rdtsc();
uint64 tscStart = __rdtsc();
unsigned int startTime = GetTickCount();
HRTick startTick = HighResolutionTimer::now().getTick();
// wait roughly 3 seconds
Expand All @@ -61,7 +63,7 @@ uint64 PPCTimer_estimateRDTSCFrequency()
}
_mm_mfence();
HRTick stopTick = HighResolutionTimer::now().getTick();
unsigned __int64 tscEnd = __rdtsc();
uint64 tscEnd = __rdtsc();
// derive frequency approximation from measured time difference
uint64 tsc_diff = tscEnd - tscStart;
uint64 hrtFreq = 0;
Expand Down
30 changes: 15 additions & 15 deletions src/Cafe/HW/Espresso/Recompiler/PPCRecompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,20 +345,20 @@ typedef struct
PPCRecFunction_t* ppcRecompilerFuncTable[PPC_REC_ALIGN_TO_4MB(PPC_REC_CODE_AREA_SIZE/4)]; // one virtual-function pointer for each potential ppc instruction
PPCREC_JUMP_ENTRY ppcRecompilerDirectJumpTable[PPC_REC_ALIGN_TO_4MB(PPC_REC_CODE_AREA_SIZE/4)]; // lookup table for ppc offset to native code function
// x64 data
uint64 __declspec(align(16)) _x64XMM_xorNegateMaskBottom[2];
uint64 __declspec(align(16)) _x64XMM_xorNegateMaskPair[2];
uint64 __declspec(align(16)) _x64XMM_xorNOTMask[2];
uint64 __declspec(align(16)) _x64XMM_andAbsMaskBottom[2];
uint64 __declspec(align(16)) _x64XMM_andAbsMaskPair[2];
uint32 __declspec(align(16)) _x64XMM_andFloatAbsMaskBottom[4];
uint64 __declspec(align(16)) _x64XMM_singleWordMask[2];
double __declspec(align(16)) _x64XMM_constDouble1_1[2];
double __declspec(align(16)) _x64XMM_constDouble0_0[2];
float __declspec(align(16)) _x64XMM_constFloat0_0[2];
float __declspec(align(16)) _x64XMM_constFloat1_1[2];
float __declspec(align(16)) _x64XMM_constFloatMin[2];
uint32 __declspec(align(16)) _x64XMM_flushDenormalMask1[4];
uint32 __declspec(align(16)) _x64XMM_flushDenormalMaskResetSignBits[4];
uint64 ALIGN(16) _x64XMM_xorNegateMaskBottom[2];
uint64 ALIGN(16) _x64XMM_xorNegateMaskPair[2];
uint64 ALIGN(16) _x64XMM_xorNOTMask[2];
uint64 ALIGN(16) _x64XMM_andAbsMaskBottom[2];
uint64 ALIGN(16) _x64XMM_andAbsMaskPair[2];
uint32 ALIGN(16) _x64XMM_andFloatAbsMaskBottom[4];
uint64 ALIGN(16) _x64XMM_singleWordMask[2];
double ALIGN(16) _x64XMM_constDouble1_1[2];
double ALIGN(16) _x64XMM_constDouble0_0[2];
float ALIGN(16) _x64XMM_constFloat0_0[2];
float ALIGN(16) _x64XMM_constFloat1_1[2];
float ALIGN(16) _x64XMM_constFloatMin[2];
uint32 ALIGN(16) _x64XMM_flushDenormalMask1[4];
uint32 ALIGN(16) _x64XMM_flushDenormalMaskResetSignBits[4];
// PSQ load/store scale tables
double _psq_ld_scale_ps0_ps1[64 * 2];
double _psq_ld_scale_ps0_1[64 * 2];
Expand Down Expand Up @@ -396,4 +396,4 @@ extern bool hasAVXSupport;

void PPCRecompiler_recompileIfUnvisited(uint32 enterAddress);
void PPCRecompiler_attemptEnter(struct PPCInterpreter_t* hCPU, uint32 enterAddress);
void PPCRecompiler_attemptEnterWithoutRecompile(struct PPCInterpreter_t* hCPU, uint32 enterAddress);
void PPCRecompiler_attemptEnterWithoutRecompile(struct PPCInterpreter_t* hCPU, uint32 enterAddress);
10 changes: 8 additions & 2 deletions src/Cafe/HW/Espresso/Recompiler/PPCRecompilerX64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,10 @@ void PPCRecompilerX64Gen_imlInstruction_r_name(PPCRecFunction_t* PPCRecFunction,
else if (sprIndex == SPR_XER)
x64Emit_mov_reg64_mem32(x64GenContext, tempToRealRegister(imlInstruction->op_r_name.registerIndex), REG_RSP, offsetof(PPCInterpreter_t, spr.XER));
else if (sprIndex >= SPR_UGQR0 && sprIndex <= SPR_UGQR7)
x64Emit_mov_reg64_mem32(x64GenContext, tempToRealRegister(imlInstruction->op_r_name.registerIndex), REG_RSP, offsetof(PPCInterpreter_t, spr.UGQR[sprIndex - SPR_UGQR0]));
{
sint32 memOffset = offsetof(PPCInterpreter_t, spr.UGQR) + sizeof(PPCInterpreter_t::spr.UGQR[0]) * (sprIndex - SPR_UGQR0);
x64Emit_mov_reg64_mem32(x64GenContext, tempToRealRegister(imlInstruction->op_r_name.registerIndex), REG_RSP, memOffset);
}
else
assert_dbg();
//x64Emit_mov_reg64_mem32(x64GenContext, tempToRealRegister(imlInstruction->op_r_name.registerIndex), REG_RSP, offsetof(PPCInterpreter_t, spr)+sizeof(uint32)*(name-PPCREC_NAME_SPR0));
Expand All @@ -2247,7 +2250,10 @@ void PPCRecompilerX64Gen_imlInstruction_name_r(PPCRecFunction_t* PPCRecFunction,
else if (sprIndex == SPR_XER)
x64Emit_mov_mem32_reg64(x64GenContext, REG_RSP, offsetof(PPCInterpreter_t, spr.XER), tempToRealRegister(imlInstruction->op_r_name.registerIndex));
else if (sprIndex >= SPR_UGQR0 && sprIndex <= SPR_UGQR7)
x64Emit_mov_mem32_reg64(x64GenContext, REG_RSP, offsetof(PPCInterpreter_t, spr.UGQR[sprIndex-SPR_UGQR0]), tempToRealRegister(imlInstruction->op_r_name.registerIndex));
{
sint32 memOffset = offsetof(PPCInterpreter_t, spr.UGQR) + sizeof(PPCInterpreter_t::spr.UGQR[0]) * (sprIndex - SPR_UGQR0);
x64Emit_mov_mem32_reg64(x64GenContext, REG_RSP, memOffset, tempToRealRegister(imlInstruction->op_r_name.registerIndex));
This conversation was marked as resolved.
Show resolved Hide resolved
}
else
assert_dbg();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Core/LatteOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ void LatteOverlay_translateScreenPosition(ScreenPosition pos, const Vector2f& wi
direction = -1;
break;
default:
__assume(false);
ASSUME(false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Core/LatteTextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,4 +425,4 @@ void LatteTC_UnloadAllTextures()
LatteTexture_Delete(itr);
}
LatteRenderTarget_unloadAll();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct LatteDecompilerCFInstruction
LatteDecompilerCFInstruction(LatteDecompilerCFInstruction&& mE) = default;
#else
LatteDecompilerCFInstruction(const LatteDecompilerCFInstruction& mE) = default;
LatteDecompilerCFInstruction(const LatteDecompilerCFInstruction&& mE) = default;
constexpr LatteDecompilerCFInstruction(LatteDecompilerCFInstruction&& mE) = default;
#endif
LatteDecompilerCFInstruction& operator=(LatteDecompilerCFInstruction&& mE) = default;
};
Expand Down
4 changes: 2 additions & 2 deletions src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ void OpenGLRenderer::shader_bind(RendererShader* shader)
prevGeometryShaderProgram = program;
break;
default:
__assume(false);
ASSUME(false);
}

catchOpenGLError();
Expand Down Expand Up @@ -1494,7 +1494,7 @@ void OpenGLRenderer::shader_unbind(RendererShader::ShaderType shaderType)
prevGeometryShaderProgram = -1;
break;
default:
__assume(false);
ASSUME(false);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Renderer/OpenGL/RendererShaderGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void RendererShaderGL::ShaderCacheLoading_begin(uint64 cacheTitleId)
usePrecompiled = false;
break;
default:
__assume(false);
ASSUME(false);
}

forceLog_printf("Using precompiled shaders: %s", usePrecompiled ? "true" : "false");
Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Renderer/OpenGL/RendererShaderGL.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "Cafe/HW/Latte/Renderer/RendererShader.h"
#include "Common\GLInclude\GLInclude.h"
#include "Common/GLInclude/GLInclude.h"

class RendererShaderGL : public RendererShader
{
Expand Down
7 changes: 3 additions & 4 deletions src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#endif

#include <glslang/Public/ShaderLang.h>
#if GLSLANG_VERSION_LESS_OR_EQUAL_TO(11, 0, 0)
#if 1 //GLSLANG_VERSION_LESS_OR_EQUAL_TO(11, 0, 0)
Crementif marked this conversation as resolved.
Show resolved Hide resolved
#include <glslang/SPIRV/GlslangToSpv.h>
#else
#include <SPIRV/Logger.h>
Expand Down Expand Up @@ -131,7 +131,7 @@ const TBuiltInResource DefaultTBuiltInResource = {
/* .maxDualSourceDrawBuffersEXT = */ 1,
#endif

/* .limits = */ {
/* .limits = */
This conversation was marked as resolved.
Show resolved Hide resolved
/* .nonInductiveForLoops = */ 1,
/* .whileLoops = */ 1,
/* .doWhileLoops = */ 1,
Expand All @@ -141,7 +141,6 @@ const TBuiltInResource DefaultTBuiltInResource = {
/* .generalSamplerIndexing = */ 1,
/* .generalVariableIndexing = */ 1,
/* .generalConstantMatrixVectorIndexing = */ 1,
}
};

class _ShaderVkThreadPool
Expand Down Expand Up @@ -470,4 +469,4 @@ void RendererShaderVk::ShaderCacheLoading_end()
{
// keep g_spirvCache open since we will write to it while the game is running
s_isLoadingShadersVk = false;
}
}
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3412,7 +3412,7 @@ VkDescriptorSetInfo::~VkDescriptorSetInfo()
break;
}
default:
__assume(false);
ASSUME(false);
}
// update global stats
performanceMonitor.vk.numDescriptorSamplerTextures.decrement(statsNumSamplerTextures);
Expand Down
8 changes: 4 additions & 4 deletions src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ uint64 VulkanRenderer::GetDescriptorSetStateHash(LatteDecompilerShader* shader)
texUnitRegIndex += Latte::REGADDR::SQ_TEX_RESOURCE_WORD0_N_GS;
break;
default:
__assume(false);
ASSUME(false);
}

auto texture = m_state.boundTexture[hostTextureUnit];
Expand Down Expand Up @@ -590,7 +590,7 @@ VkDescriptorSetInfo* VulkanRenderer::draw_getOrCreateDescriptorSet(PipelineInfo*
break;
}
default:
__assume(false);
ASSUME(false);
}

// create new descriptor set
Expand Down Expand Up @@ -646,7 +646,7 @@ VkDescriptorSetInfo* VulkanRenderer::draw_getOrCreateDescriptorSet(PipelineInfo*
texUnitRegIndex += Latte::REGADDR::SQ_TEX_RESOURCE_WORD0_N_GS;
break;
default:
__assume(false);
ASSUME(false);
}

auto textureView = m_state.boundTexture[hostTextureUnit];
Expand Down Expand Up @@ -996,7 +996,7 @@ VkDescriptorSetInfo* VulkanRenderer::draw_getOrCreateDescriptorSet(PipelineInfo*
break;
}
default:
__assume(false);
ASSUME(false);
}

return dsInfo;
Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/HW/MMU/MMU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,4 +533,4 @@ namespace MMU
}


}
}
2 changes: 1 addition & 1 deletion src/Cafe/OS/RPL/rpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ uint32 RPLLoader_MakePPCCallable(void(*ppcCallableExport)(struct PPCInterpreter_

// elf loader

uint32 ELF_LoadFromMemory(uint8* elfData, sint32 size, const char* name);
uint32 ELF_LoadFromMemory(uint8* elfData, sint32 size, const char* name);
2 changes: 1 addition & 1 deletion src/Cafe/OS/common/OSCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ void osLib_load()
swkbd::load();
camera::load();
procui_load();
}
}
2 changes: 1 addition & 1 deletion src/Cafe/OS/libs/coreinit/coreinit_MEM_BlockHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ namespace coreinit
else
track = (MEMBlockHeapTrackDEPR*)memory_getPointerFromVirtualOffsetAllowNull(_swapEndianU32(blockHeapHead->headBlock));

cemu_assert_debug(__popcnt(alignment) == 1); // not a supported alignment value
cemu_assert_debug(POPCNT(alignment) == 1); // not a supported alignment value
while (track)
{
if (track->isFree != _swapEndianU32(0))
Expand Down
4 changes: 2 additions & 2 deletions src/Cafe/OS/libs/coreinit/coreinit_Thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ namespace coreinit

bool g_isMulticoreMode;

__declspec(thread) uint32 t_assignedCoreIndex;
__declspec(thread) Fiber* t_schedulerFiber;
THREAD_LOCAL uint32 t_assignedCoreIndex;
THREAD_LOCAL Fiber* t_schedulerFiber;

struct OSHostThread
{
Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/OS/libs/coreinit/coreinit_Time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace coreinit
osLib_returnFromFunction64(hCPU, osTime);
}

__declspec(noinline) uint64 coreinit_getTimeBase_dummy()
NOINLINE uint64 coreinit_getTimeBase_dummy()
This conversation was marked as resolved.
Show resolved Hide resolved
{
return __rdtsc();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Cafe/OS/libs/nlibcurl/nlibcurl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ static_assert(sizeof(CURLMsg_t) <= 0xC, "sizeof(CURLMsg_t)");

size_t header_callback(char* buffer, size_t size, size_t nitems, void* userdata);

__declspec(thread) PPCConcurrentQueue<QueueMsg_t>* g_callerQueue;
__declspec(thread) ConcurrentQueue<QueueMsg_t>* g_threadQueue;
THREAD_LOCAL PPCConcurrentQueue<QueueMsg_t>* g_callerQueue;
THREAD_LOCAL ConcurrentQueue<QueueMsg_t>* g_threadQueue;
void CurlWorkerThread(CURL_t* curl, PPCConcurrentQueue<QueueMsg_t>* callerQueue, ConcurrentQueue<QueueMsg_t>* threadQueue)
{
g_callerQueue = callerQueue;
Expand Down
Loading