1 ;*****************************************************************************
3 ;*****************************************************************************
4 ;* Copyright (C) 2008 Loren Merritt <lorenm@u.washington.edu>
6 ;* This program is free software; you can redistribute it and/or modify
7 ;* it under the terms of the GNU General Public License as published by
8 ;* the Free Software Foundation; either version 2 of the License, or
9 ;* (at your option) any later version.
11 ;* This program is distributed in the hope that it will be useful,
12 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;* GNU General Public License for more details.
16 ;* You should have received a copy of the GNU General Public License
17 ;* along with this program; if not, write to the Free Software
18 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
19 ;*****************************************************************************
25 error_message: db "failed to preserve register", 10, 0
31 ; max number of args used by any x264 asm function.
32 ; (max_args % 4) must equal 3 for stack alignment
35 ; just random numbers to reduce the chance of incidental match
36 %define n3 dword 0x6549315c
37 %define n4 dword 0xe02f3e23
38 %define n5 dword 0xb78d0d1d
39 %define n6 dword 0x33627ba7
42 ;-----------------------------------------------------------------------------
43 ; long x264_checkasm_call( long (*func)(), int *ok, ... )
44 ;-----------------------------------------------------------------------------
45 cglobal x264_checkasm_call, 1,7
51 push dword [esp+24+max_args*4]
64 lea r1, [error_message GLOBAL]
76 ;-----------------------------------------------------------------------------
77 ; int x264_stack_pagealign( int (*func)(), int align )
78 ;-----------------------------------------------------------------------------
79 cglobal x264_stack_pagealign, 2,2