Switch back to lazyusf2, and enable JIT entitlement for it

CQTexperiment
Christopher Snowhill 2019-10-15 14:32:18 -07:00
parent 65c75a26e5
commit a23085082a
8 changed files with 65 additions and 56 deletions

View File

@ -2,7 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>

View File

@ -1947,7 +1947,7 @@
LastUpgradeCheck = 1100;
TargetAttributes = {
8D1107260486CEB800E47090 = {
DevelopmentTeam = N6E749HJ2X;
DevelopmentTeam = 4S876G9VCD;
ProvisioningStyle = Automatic;
};
};
@ -2826,7 +2826,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 4S876G9VCD;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
ThirdParty/Frameworks,
@ -2866,7 +2866,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 4S876G9VCD;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
ThirdParty/Frameworks,

View File

@ -46,6 +46,11 @@
#define OSAL_BREAKPOINT_INTERRUPT __asm__(" int $3; ");
#define ALIGN(BYTES,DATA) DATA __attribute__((aligned(BYTES)))
#define osal_inline inline
#ifdef __i386__
#define osal_fastcall __attribute__((regparm(1)))
#else
#define osal_fastcall
#endif
/* string functions */
#define osal_insensitive_strcmp(x, y) strcasecmp(x, y)

View File

@ -2532,8 +2532,12 @@ static void *malloc_exec(usf_state_t * state, size_t size)
#define MAP_ANONYMOUS MAP_ANON
#endif
#endif
#ifndef MAP_JIT
#define MAP_JIT 0
#endif
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
void *block = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS | MAP_JIT, -1, 0);
if (block == MAP_FAILED)
{ DebugMessage(state, M64MSG_ERROR, "Memory error: couldn't allocate %zi byte block of aligned RWX memory.", size); return NULL; }

View File

@ -22,7 +22,7 @@
#ifndef ALIST_INTERNAL_H
#define ALIST_INTERNAL_H
#include <our-stdbool.h>
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>

View File

@ -25,9 +25,9 @@
#include <string.h>
#include <stdio.h>
#include "../usf.h"
#include "../main.h"
#include "../usf_internal.h"
#include "../usf/usf.h"
#include "../main/main.h"
#include "../usf/usf_internal.h"
#include "hle.h"
@ -69,7 +69,7 @@ void HleErrorMessage(void* user_defined, const char *message, ...)
va_end( ap );
state->last_error = state->error_message;
StopEmulation( state );
state->stop = 1;
}
void HleWarnMessage(void* user_defined, const char *message, ...)
@ -89,12 +89,12 @@ void HleWarnMessage(void* user_defined, const char *message, ...)
va_end( ap );
state->last_error = state->error_message;
StopEmulation( state );
state->stop = 1;
}
void HleCheckInterrupts(void* user_defined)
{
CheckInterrupts((usf_state_t*)user_defined);
// check_interupt((usf_state_t*)user_defined);
}
void HleProcessDlistList(void* user_defined)

View File

@ -21,10 +21,10 @@
8384904B180764C200E7332D /* SSEQPlayer.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83848FEC1807624000E7332D /* SSEQPlayer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83CA2E3D1D7BCF9B00F2EA53 /* mGBA.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83CA24241D7BC47E00F2EA53 /* mGBA.framework */; };
83CA2E4D1D7BE41300F2EA53 /* mGBA.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83CA24241D7BC47E00F2EA53 /* mGBA.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
83DA153620F6EFD00096D348 /* lazyusf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83DA153320F6EFA80096D348 /* lazyusf.framework */; };
83DA153720F6EFE10096D348 /* lazyusf.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83DA153320F6EFA80096D348 /* lazyusf.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
83DE0CBC180B02CC00269051 /* vio2sf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83DE0C3A180A9BD500269051 /* vio2sf.framework */; };
83DE0CBD180B02D800269051 /* vio2sf.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83DE0C3A180A9BD500269051 /* vio2sf.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83E2F4D123566BC5006F7A41 /* lazyusf2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83E2F4CE23566B0C006F7A41 /* lazyusf2.framework */; };
83E2F4D223566BD5006F7A41 /* lazyusf2.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83E2F4CE23566B0C006F7A41 /* lazyusf2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
83FC32C51BF5AEFB00962B36 /* HighlyExperimental.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FC325E1BF5AB9000962B36 /* HighlyExperimental.framework */; };
83FC32C61BF5AF0600962B36 /* HighlyExperimental.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83FC325E1BF5AB9000962B36 /* HighlyExperimental.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
@ -107,20 +107,6 @@
remoteGlobalIDString = 83CA24121D7BC47C00F2EA53;
remoteInfo = mGBA;
};
83DA153220F6EFA80096D348 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83DA152E20F6EFA80096D348 /* lazyusf.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 83C8B62218AF57770071B040;
remoteInfo = lazyusf;
};
83DA153420F6EFC90096D348 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83DA152E20F6EFA80096D348 /* lazyusf.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 83C8B62118AF57770071B040;
remoteInfo = lazyusf;
};
83DE0C39180A9BD500269051 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83DE0C34180A9BD400269051 /* vio2sf.xcodeproj */;
@ -135,6 +121,20 @@
remoteGlobalIDString = 83DE0C05180A9BD400269051;
remoteInfo = vio2sf;
};
83E2F4CD23566B0C006F7A41 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83E2F4C923566B0C006F7A41 /* lazyusf2.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 83C8B62218AF57770071B040;
remoteInfo = lazyusf2;
};
83E2F4CF23566BB7006F7A41 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83E2F4C923566B0C006F7A41 /* lazyusf2.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 83C8B62118AF57770071B040;
remoteInfo = lazyusf2;
};
83FC325D1BF5AB9000962B36 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 83FC32591BF5AB9000962B36 /* HighlyExperimental.xcodeproj */;
@ -167,7 +167,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
83DA153720F6EFE10096D348 /* lazyusf.framework in CopyFiles */,
83E2F4D223566BD5006F7A41 /* lazyusf2.framework in CopyFiles */,
83CA2E4D1D7BE41300F2EA53 /* mGBA.framework in CopyFiles */,
83FC32C61BF5AF0600962B36 /* HighlyExperimental.framework in CopyFiles */,
83DE0CBD180B02D800269051 /* vio2sf.framework in CopyFiles */,
@ -200,8 +200,8 @@
8360EEF317F92AC8005208A4 /* HighlyComplete-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HighlyComplete-Prefix.pch"; sourceTree = "<group>"; };
83848FE61807623F00E7332D /* SSEQPlayer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SSEQPlayer.xcodeproj; path = ../../Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj; sourceTree = "<group>"; };
83CA241E1D7BC47C00F2EA53 /* mGBA.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = mGBA.xcodeproj; path = ../../Frameworks/mGBA/mGBA.xcodeproj; sourceTree = "<group>"; };
83DA152E20F6EFA80096D348 /* lazyusf.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = lazyusf.xcodeproj; path = ../../Frameworks/lazyusf/lazyusf.xcodeproj; sourceTree = "<group>"; };
83DE0C34180A9BD400269051 /* vio2sf.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = vio2sf.xcodeproj; path = ../../Frameworks/vio2sf/vio2sf.xcodeproj; sourceTree = "<group>"; };
83E2F4C923566B0C006F7A41 /* lazyusf2.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = lazyusf2.xcodeproj; path = ../../Frameworks/lazyusf2/lazyusf2.xcodeproj; sourceTree = "<group>"; };
83FAF8A318ADD27F00057CAF /* PlaylistController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistController.h; path = ../../../Playlist/PlaylistController.h; sourceTree = "<group>"; };
83FC32591BF5AB9000962B36 /* HighlyExperimental.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = HighlyExperimental.xcodeproj; path = ../../Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -211,7 +211,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
83DA153620F6EFD00096D348 /* lazyusf.framework in Frameworks */,
83E2F4D123566BC5006F7A41 /* lazyusf2.framework in Frameworks */,
83CA2E3D1D7BCF9B00F2EA53 /* mGBA.framework in Frameworks */,
83FC32C51BF5AEFB00962B36 /* HighlyExperimental.framework in Frameworks */,
83DE0CBC180B02CC00269051 /* vio2sf.framework in Frameworks */,
@ -279,6 +279,7 @@
8360EEE617F92AC8005208A4 /* Frameworks */ = {
isa = PBXGroup;
children = (
83E2F4C923566B0C006F7A41 /* lazyusf2.xcodeproj */,
8333B6731DCC4999004C140D /* libz.tbd */,
83CA241E1D7BC47C00F2EA53 /* mGBA.xcodeproj */,
83FC32591BF5AB9000962B36 /* HighlyExperimental.xcodeproj */,
@ -290,7 +291,6 @@
8343796317F97BDB00584396 /* HighlyAdvanced.xcodeproj */,
83848FE61807623F00E7332D /* SSEQPlayer.xcodeproj */,
83DE0C34180A9BD400269051 /* vio2sf.xcodeproj */,
83DA152E20F6EFA80096D348 /* lazyusf.xcodeproj */,
);
name = Frameworks;
sourceTree = "<group>";
@ -344,14 +344,6 @@
name = Products;
sourceTree = "<group>";
};
83DA152F20F6EFA80096D348 /* Products */ = {
isa = PBXGroup;
children = (
83DA153320F6EFA80096D348 /* lazyusf.framework */,
);
name = Products;
sourceTree = "<group>";
};
83DE0C35180A9BD400269051 /* Products */ = {
isa = PBXGroup;
children = (
@ -360,6 +352,14 @@
name = Products;
sourceTree = "<group>";
};
83E2F4CA23566B0C006F7A41 /* Products */ = {
isa = PBXGroup;
children = (
83E2F4CE23566B0C006F7A41 /* lazyusf2.framework */,
);
name = Products;
sourceTree = "<group>";
};
83FC325A1BF5AB9000962B36 /* Products */ = {
isa = PBXGroup;
children = (
@ -384,7 +384,7 @@
buildRules = (
);
dependencies = (
83DA153520F6EFC90096D348 /* PBXTargetDependency */,
83E2F4D023566BB7006F7A41 /* PBXTargetDependency */,
83CA2E3F1D7BCFB000F2EA53 /* PBXTargetDependency */,
83FC32C21BF5AEF300962B36 /* PBXTargetDependency */,
83DE0CBB180B02C500269051 /* PBXTargetDependency */,
@ -443,8 +443,8 @@
ProjectRef = 8343789C17F9658E00584396 /* HighlyTheoretical.xcodeproj */;
},
{
ProductGroup = 83DA152F20F6EFA80096D348 /* Products */;
ProjectRef = 83DA152E20F6EFA80096D348 /* lazyusf.xcodeproj */;
ProductGroup = 83E2F4CA23566B0C006F7A41 /* Products */;
ProjectRef = 83E2F4C923566B0C006F7A41 /* lazyusf2.xcodeproj */;
},
{
ProductGroup = 83CA241F1D7BC47C00F2EA53 /* Products */;
@ -513,13 +513,6 @@
remoteRef = 83CA24231D7BC47E00F2EA53 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83DA153320F6EFA80096D348 /* lazyusf.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = lazyusf.framework;
remoteRef = 83DA153220F6EFA80096D348 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83DE0C3A180A9BD500269051 /* vio2sf.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
@ -527,6 +520,13 @@
remoteRef = 83DE0C39180A9BD500269051 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83E2F4CE23566B0C006F7A41 /* lazyusf2.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = lazyusf2.framework;
remoteRef = 83E2F4CD23566B0C006F7A41 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
83FC325E1BF5AB9000962B36 /* HighlyExperimental.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
@ -584,16 +584,16 @@
name = mGBA;
targetProxy = 83CA2E3E1D7BCFB000F2EA53 /* PBXContainerItemProxy */;
};
83DA153520F6EFC90096D348 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = lazyusf;
targetProxy = 83DA153420F6EFC90096D348 /* PBXContainerItemProxy */;
};
83DE0CBB180B02C500269051 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = vio2sf;
targetProxy = 83DE0CBA180B02C500269051 /* PBXContainerItemProxy */;
};
83E2F4D023566BB7006F7A41 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = lazyusf2;
targetProxy = 83E2F4CF23566BB7006F7A41 /* PBXContainerItemProxy */;
};
83FC32C21BF5AEF300962B36 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = HighlyExperimental;

View File

@ -33,7 +33,7 @@
#import <vio2sf/state.h>
#import <lazyusf/usf.h>
#import <lazyusf2/usf.h>
#include <zlib.h>