mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Make the armjit branch compile on Blackberry, compatible with iOS. Still crashes on ArmEmitterTest().
This commit is contained in:
parent
e724d82c46
commit
62908325a0
@ -867,7 +867,8 @@ set(NativeAppSource
|
||||
android/jni/MenuScreens.cpp
|
||||
android/jni/GamepadEmu.cpp
|
||||
android/jni/UIShader.cpp
|
||||
android/jni/ui_atlas.cpp)
|
||||
android/jni/ui_atlas.cpp
|
||||
android/jni/ArmEmitterTest.cpp)
|
||||
set(AndroidAssets
|
||||
android/assets/ui_atlas.zim
|
||||
android/assets/ppge_atlas.zim)
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "CPUDetect.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
// Only Linux platforms have /proc/cpuinfo
|
||||
#if !defined(BLACKBERRY) && !defined(IOS)
|
||||
const char procfile[] = "/proc/cpuinfo";
|
||||
|
||||
char *GetCPUString()
|
||||
@ -68,8 +70,12 @@ bool CheckCPUFeature(const char *feature)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
int GetCoreCount()
|
||||
{
|
||||
#if defined(BLACKBERRY) || defined(IOS)
|
||||
return 2;
|
||||
#else
|
||||
const char marker[] = "processor\t: ";
|
||||
int cores = 0;
|
||||
char buf[1024];
|
||||
@ -86,6 +92,7 @@ int GetCoreCount()
|
||||
++cores;
|
||||
}
|
||||
return cores;
|
||||
#endif
|
||||
}
|
||||
|
||||
CPUInfo cpu_info;
|
||||
@ -106,8 +113,10 @@ void CPUInfo::Detect()
|
||||
vendor = VENDOR_ARM;
|
||||
|
||||
// Get the information about the CPU
|
||||
strncpy(cpu_string, GetCPUString(), sizeof(cpu_string));
|
||||
num_cores = GetCoreCount();
|
||||
// Hardcode this for now
|
||||
#if !defined(BLACKBERRY) && !defined(IOS)
|
||||
strncpy(cpu_string, GetCPUString(), sizeof(cpu_string));
|
||||
bSwp = CheckCPUFeature("swp");
|
||||
bHalf = CheckCPUFeature("half");
|
||||
bThumb = CheckCPUFeature("thumb");
|
||||
@ -124,17 +133,37 @@ void CPUInfo::Detect()
|
||||
// These two are ARMv8 specific.
|
||||
bFP = CheckCPUFeature("fp");
|
||||
bASIMD = CheckCPUFeature("asimd");
|
||||
#else
|
||||
bSwp = true;
|
||||
bHalf = true;
|
||||
bThumb = false;
|
||||
bFastMult = true;
|
||||
bVFP = true;
|
||||
bEDSP = true;
|
||||
bThumbEE = true;
|
||||
bNEON = true;
|
||||
bVFPv3 = true;
|
||||
bTLS = true;
|
||||
bVFPv4 = false;
|
||||
bIDIVa = false;
|
||||
bIDIVt = false;
|
||||
bFP = false;
|
||||
bASIMD = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Turn the cpu info into a string we can show
|
||||
std::string CPUInfo::Summarize()
|
||||
{
|
||||
std::string sum;
|
||||
#if defined(BLACKBERRY) || defined(IOS)
|
||||
sum = StringFromFormat("%i cores", num_cores);
|
||||
#else
|
||||
if (num_cores == 1)
|
||||
sum = StringFromFormat("%s, %i core", cpu_string, num_cores);
|
||||
else
|
||||
sum = StringFromFormat("%s, %i cores", cpu_string, num_cores);
|
||||
|
||||
#endif
|
||||
if (bSwp) sum += ", SWP";
|
||||
if (bHalf) sum += ", Half";
|
||||
if (bThumb) sum += ", Thumb";
|
||||
|
@ -61,7 +61,7 @@ const u8 *ARMXEmitter::AlignCodePage()
|
||||
|
||||
void ARMXEmitter::Flush()
|
||||
{
|
||||
__clear_cache (startcode, code);
|
||||
__builtin___clear_cache (startcode, code);
|
||||
SLEEP(0);
|
||||
}
|
||||
void ARMXEmitter::SetCC(CCFlags cond)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "base/logging.h"
|
||||
#include "ARMEmitterTest.h"
|
||||
#include "ArmEmitterTest.h"
|
||||
|
||||
#include "Common/ArmABI.h"
|
||||
#include "Common/ArmEmitter.h"
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include "MenuScreens.h"
|
||||
#include "UIShader.h"
|
||||
|
||||
#include "ARMEmitterTest.h"
|
||||
#include "ArmEmitterTest.h"
|
||||
|
||||
Texture *uiTexture;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user