[x264-devel] Windows x64 support

Loren Merritt lorenm at u.washington.edu
Sat Jan 17 22:52:24 CET 2009


On Sat, 17 Jan 2009, BugMaster wrote:

> Loren, can you tell me for what "xor  eax, eax" is used before "call
> printf" in 32 bit version of x264_checkasm_call. May be I can remove 
> "xor  eax, eax" from both 32 bit and 64 bit versions?

Number of optional arguments for the varargs calling convention.
If you don't fell like looking up varargs for win64, you can change it to 
a simpler function.

--Loren Merritt
-------------- next part --------------
diff --git a/tools/checkasm-a.asm b/tools/checkasm-a.asm
index c180abc..c881ad8 100644
--- a/tools/checkasm-a.asm
+++ b/tools/checkasm-a.asm
@@ -22,11 +22,11 @@
 
 SECTION_RODATA
 
-error_message: db "failed to preserve register", 10, 0
+error_message: db "failed to preserve register", 0
 
 SECTION .text
 
-cextern printf
+cextern puts
 
 ; max number of args used by any x264 asm function.
 ; (max_args % 4) must equal 3 for stack alignment
@@ -63,8 +63,7 @@ cglobal x264_checkasm_call, 1,7
     mov  r3, eax
     lea  r1, [error_message GLOBAL]
     push r1
-    xor  eax, eax
-    call printf
+    call puts
     add  esp, 4
     mov  r1, r1m
     mov  dword [r1], 0


More information about the x264-devel mailing list