[opus] [Aarch64 v2 11/18] Move OPUS_FAST_INT64 definition to celt/arch.h.

Jonathan Lennox jonathan at vidyo.com
Fri Nov 20 20:03:52 PST 2015


---
 celt/arch.h   | 5 +++++
 silk/macros.h | 4 +---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/celt/arch.h b/celt/arch.h
index 9f74ddd..670527b 100644
--- a/celt/arch.h
+++ b/celt/arch.h
@@ -78,6 +78,11 @@ static OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line)
 #define UADD32(a,b) ((a)+(b))
 #define USUB32(a,b) ((a)-(b))
 
+/* Set this if opus_int64 is a native type of the CPU. */
+/* Assume that all LP64 architectures have fast 64-bit types; also x86_64 (which can be ILP32 for x32)
+   and Win64 (which is LLP64). */
+#define OPUS_FAST_INT64 (defined(__LP64__) || defined(__x86_64__) || defined(_WIN64))
+
 #define PRINT_MIPS(file)
 
 #ifdef FIXED_POINT
diff --git a/silk/macros.h b/silk/macros.h
index bc30303..1ba614a 100644
--- a/silk/macros.h
+++ b/silk/macros.h
@@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 #include "opus_types.h"
 #include "opus_defines.h"
+#include "arch.h"
 
 #if OPUS_GNUC_PREREQ(3, 0)
 #define opus_likely(x)       (__builtin_expect(!!(x), 1))
@@ -43,9 +44,6 @@ POSSIBILITY OF SUCH DAMAGE.
 #define opus_unlikely(x)     (!!(x))
 #endif
 
-/* Set this if opus_int64 is a native type of the CPU. */
-#define OPUS_FAST_INT64 (defined(__x86_64__) || defined(__LP64__) || defined(_WIN64))
-
 /* This is an OPUS_INLINE header file for general platform. */
 
 /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */
-- 
2.4.9 (Apple Git-60)



More information about the opus mailing list