Merge pull request #3824 from hgomez/ARMV8

Armv8
This commit is contained in:
Twinaphex 2016-10-18 20:39:00 +02:00 committed by GitHub
commit 20716633fa
6 changed files with 20 additions and 0 deletions

View File

@ -1117,6 +1117,7 @@ static enum frontend_powerstate frontend_linux_get_powerstate(
#define LINUX_ARCH_PPC64 0x1028cf52U
#define LINUX_ARCH_MIPS 0x7c9aa25eU
#define LINUX_ARCH_TILE 0x7c9e7873U
#define LINUX_ARCH_AARCH64 0x191bfc0eU
#define LINUX_ARCH_ARMV7B 0xf27015f4U
#define LINUX_ARCH_ARMV7L 0xf27015feU
#define LINUX_ARCH_ARMV6L 0xf27015ddU
@ -1138,6 +1139,8 @@ static enum frontend_architecture frontend_linux_get_architecture(void)
switch (buffer_hash)
{
case LINUX_ARCH_AARCH64:
return FRONTEND_ARCH_ARMV8;
case LINUX_ARCH_ARMV7L:
case LINUX_ARCH_ARMV7B:
return FRONTEND_ARCH_ARMV7;

View File

@ -50,6 +50,7 @@ enum frontend_architecture
FRONTEND_ARCH_PPC,
FRONTEND_ARCH_ARM,
FRONTEND_ARCH_ARMV7,
FRONTEND_ARCH_ARMV8,
FRONTEND_ARCH_MIPS,
FRONTEND_ARCH_TILE
};

View File

@ -704,6 +704,15 @@ uint64_t cpu_features_get(void)
if (check_arm_cpu_feature("vfpv4"))
cpu |= RETRO_SIMD_VFPV4;
if (check_arm_cpu_feature("asimd"))
{
cpu |= RETRO_SIMD_ASIMD;
#ifdef __ARM_NEON__
cpu |= RETRO_SIMD_NEON;
arm_enable_runfast_mode();
#endif
}
#if 0
check_arm_cpu_feature("swp");
check_arm_cpu_feature("half");
@ -748,6 +757,7 @@ uint64_t cpu_features_get(void)
if (cpu & RETRO_SIMD_VMX128) strlcat(buf, " VMX128", sizeof(buf));
if (cpu & RETRO_SIMD_VFPU) strlcat(buf, " VFPU", sizeof(buf));
if (cpu & RETRO_SIMD_PS) strlcat(buf, " PS", sizeof(buf));
if (cpu & RETRO_SIMD_ASIMD) strlcat(buf, " ASIMD", sizeof(buf));
return cpu;
}

View File

@ -1316,6 +1316,7 @@ struct retro_log_callback
#define RETRO_SIMD_POPCNT (1 << 18)
#define RETRO_SIMD_MOVBE (1 << 19)
#define RETRO_SIMD_CMOV (1 << 20)
#define RETRO_SIMD_ASIMD (1 << 21)
typedef uint64_t retro_perf_tick_t;
typedef int64_t retro_time_t;

View File

@ -558,6 +558,9 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
case FRONTEND_ARCH_ARMV7:
strlcpy(cpu_arch_str, "ARMv7", sizeof(cpu_arch_str));
break;
case FRONTEND_ARCH_ARMV8:
strlcpy(cpu_arch_str, "ARMv8", sizeof(cpu_arch_str));
break;
case FRONTEND_ARCH_MIPS:
strlcpy(cpu_arch_str, "MIPS", sizeof(cpu_arch_str));
break;

View File

@ -1561,6 +1561,8 @@ int retroarch_get_capabilities(enum rarch_capabilities type,
strlcat(s, "VMX ", len);
if (cpu & RETRO_SIMD_VMX128)
strlcat(s, "VMX128 ", len);
if (cpu & RETRO_SIMD_ASIMD)
strlcat(s, "ASIMD ", len);
}
break;
case RARCH_CAPABILITIES_COMPILER: