Use JIT on iOS (not actually working yet, but it will start working in later commits)

This commit is contained in:
Henrik Rydgard 2016-08-28 13:43:46 +02:00
parent 13e73f8c86
commit daf10ec882
2 changed files with 3 additions and 6 deletions

View File

@ -99,7 +99,7 @@ static GraphicsContext *graphicsContext;
ram_temp_file = [[NSTemporaryDirectory() stringByAppendingPathComponent:@"ram_tmp.file"] fileSystemRepresentation];
iosCanUseJit = false;
iosCanUseJit = true;
targetIsJailbroken = false;
NSArray *jailPath = [NSArray arrayWithObjects:
@"/Applications/Cydia.app",
@ -112,11 +112,6 @@ static GraphicsContext *graphicsContext;
if ([[NSFileManager defaultManager] fileExistsAtPath:string]) {
// checking device jailbreak status in order to determine which message to show in GameSettingsScreen
targetIsJailbroken = true;
// if we're running on iOS arm64, only iOS <9 is supported with JIT.
// if we're running on anything that isn't arm64, then JIT is supported on all iOS versions.
if (![self isArm64] || ([self isArm64] && kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_IOS_9_0)) {
iosCanUseJit = true;
}
}
}

View File

@ -94,6 +94,8 @@ void Vibrate(int length_ms) {
int main(int argc, char *argv[])
{
// Simulates a debugger. Makes it possible to use JIT (though only W^X)
syscall(SYS_ptrace, 0 /*PTRACE_TRACEME*/, 0, 0, 0);
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}