[Pixman] [PATCH 07/14] ARMv6: Macro to permit testing for early returns or alternate implementations
Siarhei Siamashka
siarhei.siamashka at gmail.com
Sun Oct 13 18:27:18 PDT 2013
On Wed, 2 Oct 2013 00:00:27 +0100
Ben Avison <bavison at riscosopen.org> wrote:
> 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 patch does not seem to do anything related to early returns. Just
provides a convenience macro, similar to "pixman_asm_function" in the
other assembly files. Maybe this macro should be moved to a common
header and reused?
> ---
> pixman/pixman-arm-simd-asm.h | 26 +++++++++++++++-----------
> 1 file 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
--
Best regards,
Siarhei Siamashka
More information about the Pixman
mailing list