Initial support for android-x86 (no idea if this actually works)
This is ugly, done via HOST_NO_REC, NOT_ARM. Only if I had merged the clean-makefiles work before rls... Oh well.
This commit is contained in:
parent
d320b4a82e
commit
ac2501549f
10
core/build.h
10
core/build.h
|
@ -45,10 +45,6 @@
|
||||||
#define COMPILER_VC 0x30000001
|
#define COMPILER_VC 0x30000001
|
||||||
#define COMPILER_GCC 0x30000002
|
#define COMPILER_GCC 0x30000002
|
||||||
|
|
||||||
///
|
|
||||||
#if (!defined(TARGET_WIN86) && !defined(TARGET_BEAGLE) && !defined(TARGET_NACL32) && !defined(TARGET_GCW0) && !defined(TARGET_PANDORA))
|
|
||||||
#define TARGET_WIN86
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TARGET_WIN86
|
#ifdef TARGET_WIN86
|
||||||
#define HOST_OS OS_WINDOWS
|
#define HOST_OS OS_WINDOWS
|
||||||
|
@ -58,10 +54,14 @@
|
||||||
#define HOST_OS OS_LINUX
|
#define HOST_OS OS_LINUX
|
||||||
#define HOST_CPU CPU_ARM
|
#define HOST_CPU CPU_ARM
|
||||||
#define BUILD_COMPILER COMPILER_GCC
|
#define BUILD_COMPILER COMPILER_GCC
|
||||||
#elif TARGET_BEAGLE
|
#elif TARGET_LINUX_ARMELv7
|
||||||
#define HOST_OS OS_LINUX
|
#define HOST_OS OS_LINUX
|
||||||
#define HOST_CPU CPU_ARM
|
#define HOST_CPU CPU_ARM
|
||||||
#define BUILD_COMPILER COMPILER_GCC
|
#define BUILD_COMPILER COMPILER_GCC
|
||||||
|
#elif TARGET_LINUX_x86
|
||||||
|
#define HOST_OS OS_LINUX
|
||||||
|
#define HOST_CPU CPU_X86
|
||||||
|
#define BUILD_COMPILER COMPILER_GCC
|
||||||
#elif TARGET_GCW0
|
#elif TARGET_GCW0
|
||||||
#define HOST_OS OS_LINUX
|
#define HOST_OS OS_LINUX
|
||||||
#define HOST_CPU CPU_MIPS
|
#define HOST_CPU CPU_MIPS
|
||||||
|
|
14
core/core.mk
14
core/core.mk
|
@ -51,8 +51,18 @@ RZDCY_CXXFLAGS := \
|
||||||
else
|
else
|
||||||
RZDCY_CXXFLAGS := \
|
RZDCY_CXXFLAGS := \
|
||||||
$(CFLAGS) -c -g -O3 -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/deps \
|
$(CFLAGS) -c -g -O3 -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/deps \
|
||||||
-D_ANDROID -DRELEASE -DTARGET_BEAGLE\
|
-D_ANDROID -DRELEASE\
|
||||||
-march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 \
|
|
||||||
-frename-registers -fsingle-precision-constant -ffast-math \
|
-frename-registers -fsingle-precision-constant -ffast-math \
|
||||||
-ftree-vectorize -fomit-frame-pointer -fno-exceptions -fno-rtti -std=gnu++11
|
-ftree-vectorize -fomit-frame-pointer -fno-exceptions -fno-rtti -std=gnu++11
|
||||||
|
|
||||||
|
ifndef NOT_ARM
|
||||||
|
RZDCY_CXXFLAGS += -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16
|
||||||
|
RZDCY_CXXFLAGS += -DTARGET_LINUX_ARMELv7
|
||||||
|
else
|
||||||
|
RZDCY_CXXFLAGS += -DTARGET_LINUX_x86
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef NO_REC
|
||||||
|
RZDCY_CXXFLAGS += -DHOST_NO_REC
|
||||||
endif
|
endif
|
|
@ -789,7 +789,7 @@ u32 DYNACALL DoMemOp(u32 addr,u32 data)
|
||||||
{
|
{
|
||||||
u32 rv=0;
|
u32 rv=0;
|
||||||
|
|
||||||
#if HOST_CPU==CPU_X86
|
#if HOST_CPU==CPU_X86 && !defined(HOST_NO_REC)
|
||||||
addr=virt_arm_reg(0);
|
addr=virt_arm_reg(0);
|
||||||
data=virt_arm_reg(1);
|
data=virt_arm_reg(1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -809,7 +809,7 @@ u32 DYNACALL DoMemOp(u32 addr,u32 data)
|
||||||
arm_WriteMem32(addr,data);
|
arm_WriteMem32(addr,data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HOST_CPU==CPU_X86
|
#if HOST_CPU==CPU_X86 && !defined(HOST_NO_REC)
|
||||||
virt_arm_reg(0)=rv;
|
virt_arm_reg(0)=rv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -817,7 +817,7 @@ u32 DYNACALL DoMemOp(u32 addr,u32 data)
|
||||||
}
|
}
|
||||||
|
|
||||||
//findfirstset -- used in LDM/STM handling
|
//findfirstset -- used in LDM/STM handling
|
||||||
#if HOST_CPU==CPU_X86
|
#if HOST_CPU==CPU_X86 && BUILD_COMPILER != COMPILER_GCC
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
u32 findfirstset(u32 v)
|
u32 findfirstset(u32 v)
|
||||||
|
@ -2086,7 +2086,7 @@ void FlushCache()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if HOST_CPU==CPU_X86
|
#if HOST_CPU==CPU_X86 && HOST_OS == OS_WINDOWS
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,12 @@ struct sigcontext uc_mcontext;
|
||||||
|
|
||||||
#if HOST_CPU == CPU_ARM
|
#if HOST_CPU == CPU_ARM
|
||||||
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.arm_pc)
|
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.arm_pc)
|
||||||
#else
|
#elif HOST_CPU == CPU_MIPS
|
||||||
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.pc)
|
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.pc)
|
||||||
|
#elif HOST_CPU == CPU_X86
|
||||||
|
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.eip)
|
||||||
|
#else
|
||||||
|
#error fix ->pc support
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "hw/sh4/dyna/ngen.h"
|
#include "hw/sh4/dyna/ngen.h"
|
||||||
|
|
|
@ -58,12 +58,14 @@ typedef struct ucontext_t
|
||||||
|
|
||||||
#if HOST_CPU == CPU_ARM
|
#if HOST_CPU == CPU_ARM
|
||||||
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.arm_pc)
|
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.arm_pc)
|
||||||
#else
|
#elif HOST_CPU == CPU_MIPS
|
||||||
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.pc)
|
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.pc)
|
||||||
|
#elif HOST_CPU == CPU_X86
|
||||||
|
#define GET_PC_FROM_CONTEXT(c) (((ucontext_t *)(c))->uc_mcontext.eip)
|
||||||
|
#else
|
||||||
|
#error fix ->pc support
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file CallStack_Android.h
|
@file CallStack_Android.h
|
||||||
@brief Getting the callstack under Android
|
@brief Getting the callstack under Android
|
||||||
|
@ -275,7 +277,10 @@ void* prof(void *ptr)
|
||||||
|
|
||||||
//Write shrec syms file !
|
//Write shrec syms file !
|
||||||
prof_head(prof_out, "jitsym", "SH4");
|
prof_head(prof_out, "jitsym", "SH4");
|
||||||
|
|
||||||
|
#if !defined(HOST_NO_REC)
|
||||||
sh4_jitsym(prof_out);
|
sh4_jitsym(prof_out);
|
||||||
|
#endif
|
||||||
|
|
||||||
//Write arm7rec syms file ! -> to do
|
//Write arm7rec syms file ! -> to do
|
||||||
//prof_head(prof_out,"jitsym","ARM7");
|
//prof_head(prof_out,"jitsym","ARM7");
|
||||||
|
|
|
@ -21,6 +21,11 @@ include $(CLEAR_VARS)
|
||||||
|
|
||||||
FOR_ANDROID := 1
|
FOR_ANDROID := 1
|
||||||
|
|
||||||
|
ifneq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
|
NOT_ARM := 1
|
||||||
|
NO_REC := 1
|
||||||
|
endif
|
||||||
|
|
||||||
include $(LOCAL_PATH)/../../core/core.mk
|
include $(LOCAL_PATH)/../../core/core.mk
|
||||||
|
|
||||||
LOCAL_SRC_FILES := $(RZDCY_FILES) $(wildcard $(LOCAL_PATH)/jni/src/*.cpp)
|
LOCAL_SRC_FILES := $(RZDCY_FILES) $(wildcard $(LOCAL_PATH)/jni/src/*.cpp)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
APP_STL := stlport_static
|
APP_STL := stlport_static
|
||||||
#APP_ABI := armeabi-v7a x86
|
APP_ABI := armeabi-v7a x86
|
||||||
APP_ABI := armeabi-v7a
|
#APP_ABI := armeabi-v7a
|
||||||
APP_PLATFORM := android-18
|
APP_PLATFORM := android-18
|
||||||
NDK_TOOLCHAIN_VERSION := 4.8
|
NDK_TOOLCHAIN_VERSION := 4.8
|
|
@ -369,8 +369,10 @@ JNIEXPORT jint JNICALL Java_com_reicast_emulator_emu_JNIdc_send(JNIEnv *env,jobj
|
||||||
}
|
}
|
||||||
if (param==2)
|
if (param==2)
|
||||||
{
|
{
|
||||||
|
#if !defined(HOST_NO_REC)
|
||||||
print_stats=true;
|
print_stats=true;
|
||||||
printf("Storing blocks ...\n");
|
printf("Storing blocks ...\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (cmd==1)
|
else if (cmd==1)
|
||||||
|
|
Loading…
Reference in New Issue