Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/opus/src/m4/as-gcc-inline-assembly.m4

Issue 2195313002: Remove Opus from DEPS and import a local copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Local copy of opus, opus/src/.gitignore, opus/DEPS, update README.chromium Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/opus/src/include/opus_types.h ('k') | third_party/opus/src/m4/opus-intrinsics.m4 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/opus/src/m4/as-gcc-inline-assembly.m4
diff --git a/third_party/opus/src/m4/as-gcc-inline-assembly.m4 b/third_party/opus/src/m4/as-gcc-inline-assembly.m4
new file mode 100644
index 0000000000000000000000000000000000000000..b0d2da414a157f6706fe23fc6218418df3e5e4da
--- /dev/null
+++ b/third_party/opus/src/m4/as-gcc-inline-assembly.m4
@@ -0,0 +1,98 @@
+dnl as-gcc-inline-assembly.m4 0.1.0
+
+dnl autostars m4 macro for detection of gcc inline assembly
+
+dnl David Schleef <ds@schleef.org>
+
+dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
+dnl Tries to compile with the given CFLAGS.
+dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
+dnl and ACTION-IF-NOT-ACCEPTED otherwise.
+
+AC_DEFUN([AS_GCC_INLINE_ASSEMBLY],
+[
+ AC_MSG_CHECKING([if compiler supports gcc-style inline assembly])
+
+ AC_TRY_COMPILE([], [
+#ifdef __GNUC_MINOR__
+#if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004
+#error GCC before 3.4 has critical bugs compiling inline assembly
+#endif
+#endif
+__asm__ (""::) ], [flag_ok=yes], [flag_ok=no])
+
+ if test "X$flag_ok" = Xyes ; then
+ $1
+ true
+ else
+ $2
+ true
+ fi
+ AC_MSG_RESULT([$flag_ok])
+])
+
+AC_DEFUN([AS_ASM_ARM_NEON],
+[
+ AC_MSG_CHECKING([if assembler supports NEON instructions on ARM])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[__asm__("vorr d0,d0,d0")])],
+ [AC_MSG_RESULT([yes])
+ $1],
+ [AC_MSG_RESULT([no])
+ $2])
+])
+
+AC_DEFUN([AS_ASM_ARM_NEON_FORCE],
+[
+ AC_MSG_CHECKING([if assembler supports NEON instructions on ARM])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[__asm__(".arch armv7-a\n.fpu neon\n.object_arch armv4t\nvorr d0,d0,d0")])],
+ [AC_MSG_RESULT([yes])
+ $1],
+ [AC_MSG_RESULT([no])
+ $2])
+])
+
+AC_DEFUN([AS_ASM_ARM_MEDIA],
+[
+ AC_MSG_CHECKING([if assembler supports ARMv6 media instructions on ARM])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[__asm__("shadd8 r3,r3,r3")])],
+ [AC_MSG_RESULT([yes])
+ $1],
+ [AC_MSG_RESULT([no])
+ $2])
+])
+
+AC_DEFUN([AS_ASM_ARM_MEDIA_FORCE],
+[
+ AC_MSG_CHECKING([if assembler supports ARMv6 media instructions on ARM])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[__asm__(".arch armv6\n.object_arch armv4t\nshadd8 r3,r3,r3")])],
+ [AC_MSG_RESULT([yes])
+ $1],
+ [AC_MSG_RESULT([no])
+ $2])
+])
+
+AC_DEFUN([AS_ASM_ARM_EDSP],
+[
+ AC_MSG_CHECKING([if assembler supports EDSP instructions on ARM])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[__asm__("qadd r3,r3,r3")])],
+ [AC_MSG_RESULT([yes])
+ $1],
+ [AC_MSG_RESULT([no])
+ $2])
+])
+
+AC_DEFUN([AS_ASM_ARM_EDSP_FORCE],
+[
+ AC_MSG_CHECKING([if assembler supports EDSP instructions on ARM])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[__asm__(".arch armv5te\n.object_arch armv4t\nqadd r3,r3,r3")])],
+ [AC_MSG_RESULT([yes])
+ $1],
+ [AC_MSG_RESULT([no])
+ $2])
+])
« no previous file with comments | « third_party/opus/src/include/opus_types.h ('k') | third_party/opus/src/m4/opus-intrinsics.m4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698