[x264-devel] [PATCH] checkasm: arm: Use a macro to share code between the neon/noneon versions

Janne Grunau janne-x264 at jannau.net
Mon Aug 31 01:20:22 CEST 2015


On 2015-08-29 23:29:41 +0300, Martin Storsjö wrote:
> ---
> This can be squashed into the earlier "checkasm: arm: Check register
> clobbering" if you want to.
> ---
>  tools/checkasm-arm.S |   76 ++++++++++++--------------------------------------
>  1 file changed, 18 insertions(+), 58 deletions(-)
> 
> diff --git a/tools/checkasm-arm.S b/tools/checkasm-arm.S
> index 93c96d9..60c0e50 100644
> --- a/tools/checkasm-arm.S
> +++ b/tools/checkasm-arm.S
> @@ -46,14 +46,20 @@ error_message:
>  #define MAX_ARGS 15
>  
>  #define ARG_STACK 4*(MAX_ARGS - 2)
> -#define PUSHED 16*4 + 4*10
>  
> -function x264_checkasm_call_neon
> +.macro clobbercheck name, neon

.macro clobbercheck variant

> +.equ pushed, 4*10
> +function \name

function x264_checkasm_call_\variant

>      push        {r4-r11, lr}
> +.if \neon

.ifc \variant, neon

for all checks

[...]

> +clobbercheck x264_checkasm_call_neon, 1
> +clobbercheck x264_checkasm_call_noneon, 0

clobbercheck neon
clobbercheck noneon

would avoid passing the same argument in two forms to the clobbercheck 
macro

patch ok with or without that changed.

Janne


More information about the x264-devel mailing list