ARM: share pixman_asm_function definition
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 31 Mar 2014 12:03:43 +0000 (15:03 +0300)
committerSiarhei Siamashka <siarhei.siamashka@gmail.com>
Wed, 2 Apr 2014 09:48:26 +0000 (12:48 +0300)
Several files define identically the asm macro pixman_asm_function.
Merge all these definitions into a new asm header.

The original definition is taken from pixman-arm-simd-asm-scaled.S with
the copyright/licence/author blurb verbatim.

pixman/Makefile.am
pixman/pixman-arm-asm.h [new file with mode: 0644]
pixman/pixman-arm-neon-asm-bilinear.S
pixman/pixman-arm-neon-asm.S
pixman/pixman-arm-simd-asm-scaled.S

index b376d9a..581b6f6 100644 (file)
@@ -72,6 +72,7 @@ libpixman_arm_simd_la_SOURCES = \
        pixman-arm-common.h     \
        pixman-arm-simd-asm.S   \
        pixman-arm-simd-asm-scaled.S \
+       pixman-arm-asm.h        \
        pixman-arm-simd-asm.h
 libpixman_1_la_LIBADD += libpixman-arm-simd.la
 
@@ -86,6 +87,7 @@ libpixman_arm_neon_la_SOURCES = \
         pixman-arm-common.h    \
         pixman-arm-neon-asm.S  \
                pixman-arm-neon-asm-bilinear.S \
+        pixman-arm-asm.h       \
         pixman-arm-neon-asm.h
 libpixman_1_la_LIBADD += libpixman-arm-neon.la
 
diff --git a/pixman/pixman-arm-asm.h b/pixman/pixman-arm-asm.h
new file mode 100644 (file)
index 0000000..ee78541
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright © 2008 Mozilla Corporation
+ * Copyright © 2010 Nokia Corporation
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Mozilla Corporation not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  Mozilla Corporation makes no
+ * representations about the suitability of this software for any purpose.  It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ *
+ * Author:  Jeff Muizelaar (jeff@infidigm.net)
+ *
+ */
+
+/* Supplementary macro for setting function attributes */
+.macro pixman_asm_function fname
+       .func fname
+       .global fname
+#ifdef __ELF__
+       .hidden fname
+       .type fname, %function
+#endif
+fname:
+.endm
index e37b5c2..0fd92d6 100644 (file)
 .p2align 2
 
 #include "pixman-private.h"
+#include "pixman-arm-asm.h"
 #include "pixman-arm-neon-asm.h"
 
 /*
  * Bilinear macros from pixman-arm-neon-asm.S
  */
 
-/* Supplementary macro for setting function attributes */
-.macro pixman_asm_function fname
-    .func fname
-    .global fname
-#ifdef __ELF__
-    .hidden fname
-    .type fname, %function
-#endif
-fname:
-.endm
-
 /*
  * Bilinear scaling support code which tries to provide pixel fetching, color
  * format conversion, and interpolation as separate macros which can be used
index 187197d..7e949a3 100644 (file)
@@ -50,6 +50,7 @@
     .p2align 2
 
 #include "pixman-private.h"
+#include "pixman-arm-asm.h"
 #include "pixman-arm-neon-asm.h"
 
 /* Global configuration options and preferences */
@@ -2830,17 +2831,6 @@ generate_composite_function_nearest_scanline \
 
 /******************************************************************************/
 
-/* Supplementary macro for setting function attributes */
-.macro pixman_asm_function fname
-    .func fname
-    .global fname
-#ifdef __ELF__
-    .hidden fname
-    .type fname, %function
-#endif
-fname:
-.endm
-
 /*
  * Bilinear scaling support code which tries to provide pixel fetching, color
  * format conversion, and interpolation as separate macros which can be used
index 7110995..e050292 100644 (file)
        .altmacro
        .p2align 2
 
-/* Supplementary macro for setting function attributes */
-.macro pixman_asm_function fname
-       .func fname
-       .global fname
-#ifdef __ELF__
-       .hidden fname
-       .type fname, %function
-#endif
-fname:
-.endm
+#include "pixman-arm-asm.h"
 
 /*
  * Note: This code is only using armv5te instructions (not even armv6),