test alignas()
This commit is contained in:
parent
02c037b5cb
commit
a51e030414
|
@ -1176,6 +1176,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULE_DEBUGGING = YES;
|
CLANG_ENABLE_MODULE_DEBUGGING = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
|
@ -1215,6 +1216,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULE_DEBUGGING = YES;
|
CLANG_ENABLE_MODULE_DEBUGGING = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
|
@ -1278,6 +1280,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CODE_SIGN_ENTITLEMENTS = SheepShaver.entitlements;
|
CODE_SIGN_ENTITLEMENTS = SheepShaver.entitlements;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
|
@ -1342,6 +1345,7 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CODE_SIGN_ENTITLEMENTS = SheepShaver.entitlements;
|
CODE_SIGN_ENTITLEMENTS = SheepShaver.entitlements;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
|
|
|
@ -372,7 +372,6 @@ powerpc_cpu::powerpc_cpu(task_struct *parent_task)
|
||||||
#if PPC_ENABLE_JIT
|
#if PPC_ENABLE_JIT
|
||||||
use_jit = false;
|
use_jit = false;
|
||||||
#endif
|
#endif
|
||||||
spcflags().init();
|
|
||||||
++ppc_refcount;
|
++ppc_refcount;
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,16 +46,10 @@ class powerpc_cpu
|
||||||
//
|
//
|
||||||
// We can't assume (offsetof(powerpc_cpu, regs) % 16) == 0 since
|
// We can't assume (offsetof(powerpc_cpu, regs) % 16) == 0 since
|
||||||
// extra data could be inserted prior regs, e.g. pointer to vtable
|
// extra data could be inserted prior regs, e.g. pointer to vtable
|
||||||
struct {
|
powerpc_registers _regs;
|
||||||
powerpc_registers regs;
|
|
||||||
uint8 pad[16];
|
|
||||||
} _regs;
|
|
||||||
|
|
||||||
// Make sure the calculation of the current offset makes use of
|
powerpc_registers const & regs() const { return _regs; }
|
||||||
// 'this' as this could make it simplified at compile-time
|
powerpc_registers & regs() { return _regs; }
|
||||||
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(); }
|
|
||||||
|
|
||||||
#if PPC_PROFILE_REGS_USE
|
#if PPC_PROFILE_REGS_USE
|
||||||
// Registers use statistics
|
// Registers use statistics
|
||||||
|
|
|
@ -200,7 +200,7 @@ union powerpc_vr
|
||||||
* User Environment Architecture (UEA) Register Set
|
* User Environment Architecture (UEA) Register Set
|
||||||
**/
|
**/
|
||||||
|
|
||||||
struct powerpc_registers
|
struct alignas(16) powerpc_registers
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
GPR_BASE = 0,
|
GPR_BASE = 0,
|
||||||
|
|
|
@ -41,10 +41,8 @@ class basic_spcflags
|
||||||
public:
|
public:
|
||||||
|
|
||||||
basic_spcflags()
|
basic_spcflags()
|
||||||
{ init(); }
|
: mask(0), lock(SPIN_LOCK_UNLOCKED)
|
||||||
|
{ }
|
||||||
void init()
|
|
||||||
{ mask = 0; lock = SPIN_LOCK_UNLOCKED; }
|
|
||||||
|
|
||||||
bool empty() const
|
bool empty() const
|
||||||
{ return (mask == 0); }
|
{ return (mask == 0); }
|
||||||
|
|
Loading…
Reference in New Issue