diff --git a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj index 30b69bfb..d455b635 100755 --- a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj @@ -1176,6 +1176,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULE_DEBUGGING = YES; COPY_PHASE_STRIP = NO; @@ -1215,6 +1216,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULE_DEBUGGING = YES; COPY_PHASE_STRIP = NO; @@ -1278,6 +1280,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CODE_SIGN_ENTITLEMENTS = SheepShaver.entitlements; COPY_PHASE_STRIP = NO; @@ -1342,6 +1345,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; CODE_SIGN_ENTITLEMENTS = SheepShaver.entitlements; COPY_PHASE_STRIP = NO; diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp index 39a31ecb..eefa1f95 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp @@ -372,7 +372,6 @@ powerpc_cpu::powerpc_cpu(task_struct *parent_task) #if PPC_ENABLE_JIT use_jit = false; #endif - spcflags().init(); ++ppc_refcount; initialize(); } diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp index f1739a5f..2f632232 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp @@ -46,16 +46,10 @@ class powerpc_cpu // // We can't assume (offsetof(powerpc_cpu, regs) % 16) == 0 since // extra data could be inserted prior regs, e.g. pointer to vtable - struct { - powerpc_registers regs; - uint8 pad[16]; - } _regs; + powerpc_registers _regs; - // Make sure the calculation of the current offset makes use of - // 'this' as this could make it simplified at compile-time - powerpc_registers *regs_ptr() const { return (powerpc_registers *)((char *)&_regs.regs + (16 - (((char *)&_regs.regs - (char *)this) % 16))); } - powerpc_registers const & regs() const { return *regs_ptr(); } - powerpc_registers & regs() { return *regs_ptr(); } + powerpc_registers const & regs() const { return _regs; } + powerpc_registers & regs() { return _regs; } #if PPC_PROFILE_REGS_USE // Registers use statistics diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-registers.hpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-registers.hpp index a44a32df..05662c68 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-registers.hpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-registers.hpp @@ -200,7 +200,7 @@ union powerpc_vr * User Environment Architecture (UEA) Register Set **/ -struct powerpc_registers +struct alignas(16) powerpc_registers { enum { GPR_BASE = 0, diff --git a/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp b/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp index d379f1cb..0b521d53 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp @@ -41,10 +41,8 @@ class basic_spcflags public: basic_spcflags() - { init(); } - - void init() - { mask = 0; lock = SPIN_LOCK_UNLOCKED; } + : mask(0), lock(SPIN_LOCK_UNLOCKED) + { } bool empty() const { return (mask == 0); }