X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=plugins%2Fgpu_unai%2Fgpu_fixedpoint.h;h=e72fda12f6d46eae1181243371ccfe8ecd29ae2f;hp=03f07d2108bf8d3d84a43591b73d5fef5e91bf6f;hb=665f33e1e8ce2e40a7939a33075c3bce1c90790c;hpb=da710571b75db7031b82924ab3ad47eb645ce215 diff --git a/plugins/gpu_unai/gpu_fixedpoint.h b/plugins/gpu_unai/gpu_fixedpoint.h index 03f07d21..e72fda12 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; }