When the source or mask is solid (as opposed to a bitmap) there is the
possibility of an immediate exit, or a branch to an alternate, more optimal
implementation in some cases. This is best achieved with a brief prologue to
the function; to permit this, the necessary boilerplate for setting up a
function entry is now available in the "startfunc" macro.

This feature was first included in my over_n_8888 fast path, but since that's
still sitting in the submission queue at the time of writing, I'm posting it
again as an independent patch.
---
 pixman/pixman-arm-simd-asm.h |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/pixman/pixman-arm-simd-asm.h b/pixman/pixman-arm-simd-asm.h
index c7e5ca7..a41e1e0 100644
--- a/pixman/pixman-arm-simd-asm.h
+++ b/pixman/pixman-arm-simd-asm.h
@@ -107,6 +107,20 @@
 .set PREFETCH_TYPE_NONE,       0
 .set PREFETCH_TYPE_STANDARD,   1
 
+.macro startfunc fname
+#ifdef PROFILING
+ .p2align 9
+#endif
+ .func fname
+ .global fname
+ /* For ELF format also set function visibility to hidden */
+#ifdef __ELF__
+ .hidden fname
+ .type fname, %function
+#endif
+fname:
+.endm
+
 /*
  * Definitions of macros for load/store of pixel data.
  */
@@ -596,16 +610,7 @@
                                    process_tail, \
                                    process_inner_loop
 
-#ifdef PROFILING
- .p2align 9
-#endif
- .func fname
- .global fname
- /* For ELF format also set function visibility to hidden */
-#ifdef __ELF__
- .hidden fname
- .type fname, %function
-#endif
+startfunc fname
 
 /*
  * Make some macro arguments globally visible and accessible
@@ -717,7 +722,6 @@
     SCRATCH     .req    r12
     ORIG_W      .req    r14 /* width (pixels) */
 
-fname:
         push    {r4-r11, lr}        /* save all registers */
 
         subs    Y, Y, #1
-- 
1.7.5.4

_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to