aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authornotaz2012-11-30 02:53:25 +0200
committernotaz2012-12-02 02:37:11 +0200
commit665f33e1e8ce2e40a7939a33075c3bce1c90790c (patch)
treee698dae48cdae636961762d00fb6a42e80653dcd /plugins
parentda710571b75db7031b82924ab3ad47eb645ce215 (diff)
downloadpcsx_rearmed-665f33e1e8ce2e40a7939a33075c3bce1c90790c.tar.gz
pcsx_rearmed-665f33e1e8ce2e40a7939a33075c3bce1c90790c.tar.bz2
pcsx_rearmed-665f33e1e8ce2e40a7939a33075c3bce1c90790c.zip
improve ARM feature detection
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfsound/arm_utils.S3
-rw-r--r--plugins/dfsound/spu.c3
-rw-r--r--plugins/gpu_unai/gpu_fixedpoint.h4
3 files changed, 7 insertions, 3 deletions
diff --git a/plugins/dfsound/arm_utils.S b/plugins/dfsound/arm_utils.S
index 22e5844..f4ef243 100644
--- a/plugins/dfsound/arm_utils.S
+++ b/plugins/dfsound/arm_utils.S
@@ -8,6 +8,7 @@
* See the COPYING file in the top-level directory.
*/
+#include "arm_features.h"
.text
.align 2
@@ -100,7 +101,7 @@ mcr_finish:
vstmiage r3!, {d8}
bx lr
-#else
+#elif defined(HAVE_ARMV5)
.global mix_chan @ (int start, int count, int lv, int rv)
mix_chan:
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index 45a7886..2466569 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -25,6 +25,7 @@
#include "externals.h"
#include "registers.h"
#include "out.h"
+#include "arm_features.h"
#ifdef ENABLE_NLS
#include <libintl.h>
@@ -615,7 +616,7 @@ static int do_samples_noise(int ch, int ns, int ns_to)
return ret;
}
-#ifdef __arm__
+#ifdef HAVE_ARMV5
// asm code; lv and rv must be 0-3fff
extern void mix_chan(int start, int count, int lv, int rv);
extern void mix_chan_rvb(int start, int count, int lv, int rv);
diff --git a/plugins/gpu_unai/gpu_fixedpoint.h b/plugins/gpu_unai/gpu_fixedpoint.h
index 03f07d2..e72fda1 100644
--- a/plugins/gpu_unai/gpu_fixedpoint.h
+++ b/plugins/gpu_unai/gpu_fixedpoint.h
@@ -21,6 +21,8 @@
#ifndef FIXED_H
#define FIXED_H
+#include "arm_features.h"
+
typedef s32 fixed;
#ifdef GPU_TABLE_10_BITS
@@ -55,7 +57,7 @@ INLINE u32 Log2(u32 _a)
}
*/
-#ifdef __arm__
+#ifdef HAVE_ARMV5
INLINE u32 Log2(u32 x) { u32 res; asm("clz %0,%1" : "=r" (res) : "r" (x)); return 32-res; }
#else
INLINE u32 Log2(u32 x) { u32 i = 0; for ( ; x > 0; ++i, x >>= 1); return i - 1; }