[x264-devel] commit: don't pretend to support win64. remove all related code. ( Loren Merritt )

git version control git at videolan.org
Wed May 14 08:01:12 CEST 2008


x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Mon May  5 16:28:24 2008 -0600| [5e103026a9c1661c3743a851b4fe928982bb0fb9]

don't pretend to support win64. remove all related code.
it hasn't worked since probably some time in 2005, and won't ever be fixed unless someone steps up to maintain it.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=5e103026a9c1661c3743a851b4fe928982bb0fb9
---

 common/x86/cpu-64.asm    |   12 +--
 common/x86/x86inc-64.asm |  231 ----------------------------------------------
 common/x86/x86inc.asm    |   43 +---------
 3 files changed, 2 insertions(+), 284 deletions(-)

diff --git a/common/x86/cpu-64.asm b/common/x86/cpu-64.asm
index a1ab0cb..99007a5 100644
--- a/common/x86/cpu-64.asm
+++ b/common/x86/cpu-64.asm
@@ -28,28 +28,18 @@ SECTION .text
 ; int x264_cpu_cpuid( int op, int *eax, int *ebx, int *ecx, int *edx )
 ;-----------------------------------------------------------------------------
 cglobal x264_cpu_cpuid
-    firstpush rbx
-    pushreg   rbx
-    endprolog
-
+    push    rbx
     mov     r10,   r3
     mov     r11,   r2
     mov     r9,    r1
-%ifdef WIN64
-    mov     r8,    [rsp+40+8]
-%endif
-
     mov     eax,   r0d
     cpuid
-
     mov     [r9],  eax
     mov     [r11], ebx
     mov     [r10], ecx
     mov     [r8],  edx
-
     pop     rbx
     ret
-    endfunc
 
 ;-----------------------------------------------------------------------------
 ; void x264_emms( void )
diff --git a/common/x86/x86inc-64.asm b/common/x86/x86inc-64.asm
index 2476470..5396fd8 100644
--- a/common/x86/x86inc-64.asm
+++ b/common/x86/x86inc-64.asm
@@ -3,8 +3,6 @@
 ;*****************************************************************************
 ;* Copyright (C) 2005-2008 x264 project
 ;*
-;* Authors: Andrew Dunstan
-;*
 ;* This program is free software; you can redistribute it and/or modify
 ;* it under the terms of the GNU General Public License as published by
 ;* the Free Software Foundation; either version 2 of the License, or
@@ -38,235 +36,6 @@ BITS 64
     %endif
 %endmacro
 
-%macro pad 1
-    %undef %1
-    %ifdef PREFIX
-        %define %1 _%1
-    %endif
-    %ifdef WIN64
-        times 6 nop
-        align 16
-        %1
-        .startfunc
-        %assign unwindcount 0
-        %assign framereg 0
-    %else
-        align 16
-        %1
-    %endif
-%endmacro
-
-%ifdef WIN64
-
-%define __PIC__
-
-%define parm1q rcx
-%define parm2q rdx
-%define parm3q r8
-%define parm4q r9
-%define parm5q [rsp+40]
-%define parm6q [rsp+48]
-%define parm7q [rsp+56]
-%define parm8q [rsp+64]
-%define parm1d ecx
-%define parm2d edx
-%define parm3d r8d
-%define parm4d r9d
-%define parm5d dword parm5q
-%define parm6d dword parm6q
-%define parm7d dword parm7q
-%define parm8d dword parm8q
-
-%define temp1q rdi
-%define temp2q rsi
-%define temp1d edi
-%define temp2d esi
-
-%macro firstpush 1
-    db 0x48
-    push %1
-%endmacro
-
-%define unwindcode(count, code) .unwind %+ count EQU code
-
-%define regcoderax 0
-%define regcodercx 1
-%define regcoderdx 2
-%define regcoderbx 3
-%define regcodersp 4
-%define regcoderbp 5
-%define regcodersi 6
-%define regcoderdi 7
-%define regcoder8 8
-%define regcoder9 9
-%define regcoder10 10
-%define regcoder11 11
-%define regcoder12 12
-%define regcoder13 13
-%define regcoder14 14
-%define regcoder15 15
-%define regcodexmm0 0
-%define regcodexmm1 1
-%define regcodexmm2 2
-%define regcodexmm3 3
-%define regcodexmm4 4
-%define regcodexmm5 5
-%define regcodexmm6 6
-%define regcodexmm7 7
-%define regcodexmm8 8
-%define regcodexmm9 9
-%define regcodexmm10 10
-%define regcodexmm11 11
-%define regcodexmm12 12
-%define regcodexmm13 13
-%define regcodexmm14 14
-%define regcodexmm15 15
-
-%macro allocstack 1
-    %if %1 < 8
-        %error Stack Allocation must be at least 8 bytes.
-    %elif %1 < 129
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, $-.startfunc + 0x200 + (((%1-8)/8)<<12))
-    %elif %1 < 524288
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %1/8)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, $-.startfunc + 0x100)
-    %else
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %1>>16)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %1 & 0x0000FFFF)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, $-.startfunc + 0x1100)
-    %endif
-%endmacro
-
-%macro pushreg 1
-    %assign unwindcount unwindcount+1
-    unwindcode(unwindcount, $-.startfunc + 0 + (regcode%1 << 12))
-%endmacro
-
-%macro setframe 2
-    %if ((%2 % 16) | (%2 > 240) | (%2 < 0))
-        %error Frame offset must be a multiple of 16 between 0 and 240.
-    %endif
-    %assign unwindcount unwindcount+1
-    unwindcode(unwindcount, $-.startfunc + (3 << 8 )+ (regcode%1 << 12))
-    %assign framereg regcode%1 + %2
-%endmacro
-
-%macro savereg 2
-    %if ((%2 % 8) | (%2 < 0))
-        %error Offset must be a positive multiple of 8.
-    %endif
-    %if (%2 < 64504)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %2/8)
-        %assign unwindcount unwindcount +1
-        unwindcode(unwindcount, $-.startfunc + (4 << 8) + (regcode%1 << 12))
-    %else
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %2 >> 16)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %2 & 0x0000FFFF)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, $-.startfunc + (5 << 8) + (regcode%1 << 12))
-    %endif
-%endmacro
-
-%macro savexmm128 2
-    %if ((%2 % 16) | (%2 < 0))
-        %error Offset must be a positive multiple of 16.
-    %endif
-    %if (%2 < 64512)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %2/16)
-        %assign unwindcount unwindcount +1
-        unwindcode(unwindcount, $-.startfunc + (8 << 8) + (regcode%1 << 12))
-    %else
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %2 >> 16)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, %2 & 0x0000FFFF)
-        %assign unwindcount unwindcount+1
-        unwindcode(unwindcount, $-.startfunc + (9 << 8) + (regcode%1 << 12))
-    %endif
-%endmacro
-
-%macro endprolog 0
-.endprolog:
-SECTION .xdata
-.unwindinfo:
-    db 0x01
-    db .endprolog-.startfunc
-    db unwindcount
-    db framereg
-    %rep unwindcount
-        dw .unwind %+ unwindcount
-        %assign unwindcount unwindcount-1
-    %endrep
-align 4,db 0
-SECTION .text
-%endmacro
-
-%macro endfunc 0
-.endfunc:
-SECTION .pdata
-    dd .startfunc
-    dd .endfunc
-    dd .unwindinfo
-SECTION .text
-%endmacro
-
-%else ;linux
-%define parm1q rdi
-%define parm2q rsi
-%define parm3q rdx
-%define parm4q rcx
-%define parm5q r8
-%define parm6q r9
-%define parm7q [rsp+8]
-%define parm8q [rsp+16]
-%define parm1d edi
-%define parm2d esi
-%define parm3d edx
-%define parm4d ecx
-%define parm5d r8d
-%define parm6d r9d
-%define parm7d dword parm7q
-%define parm8d dword parm8q
-
-%define temp1q r9
-%define temp2q r8
-%define temp1d r9d
-%define temp2d r8d
-
-%macro allocstack 1
-%endmacro
-
-%macro firstpush 1
-    push %1
-%endmacro
-
-%macro pushreg 1
-%endmacro
-
-%macro setframe 2
-%endmacro
-
-%macro savereg 2
-%endmacro
-
-%macro savexmm128 2
-%endmacro
-
-%define endprolog
-%define endfunc
-
-%endif ;linux
-
 ; PIC support macros. On x86_64 we just use RIP-relative addressing, which is
 ; much simpler than the GOT handling we need to perform on x86.
 ;
diff --git a/common/x86/x86inc.asm b/common/x86/x86inc.asm
index 307d246..d33f6f6 100644
--- a/common/x86/x86inc.asm
+++ b/common/x86/x86inc.asm
@@ -18,10 +18,6 @@
 ;* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 ;*****************************************************************************
 
-%ifdef WIN64
-%define ARCH_X86_64
-%endif
-
 %ifdef ARCH_X86_64
 %include "x86inc-64.asm"
 %else
@@ -129,41 +125,7 @@ DECLARE_REG_SIZE bp, bpl
     %endif
 %endmacro
 
-%ifdef WIN64 ;================================================================
-
-DECLARE_REG 0, rcx, ecx, cx,  cl,  ecx
-DECLARE_REG 1, rdx, edx, dx,  dl,  edx
-DECLARE_REG 2, r8,  r8d, r8w, r8b, r8d
-DECLARE_REG 3, r9,  r9d, r9w, r9b, r9d
-DECLARE_REG 4, rdi, edi, di,  dil, [rsp + stack_offset + 40]
-DECLARE_REG 5, rsi, esi, si,  sil, [rsp + stack_offset + 48]
-DECLARE_REG 6, rax, eax, ax,  al,  [rsp + stack_offset + 56]
-%define r7m [rsp + stack_offset + 64]
-
-%macro LOAD_IF_USED 2 ; reg_id, number_of_args
-    %if %1 < %2
-        mov r%1, [rsp + 8 + %1*8]
-    %endif
-%endmacro
-
-%macro PROLOGUE 3
-    ASSERT %2 >= %1
-    ASSERT %2 <= 7
-    %assign stack_offset 0
-    LOAD_IF_USED 4, %1
-    LOAD_IF_USED 5, %1
-    LOAD_IF_USED 6, %1
-%endmacro
-
-%macro RET 0
-    ret
-%endmacro
-
-%macro REP_RET 0
-    rep ret
-%endmacro
-
-%elifdef ARCH_X86_64 ;========================================================
+%ifdef ARCH_X86_64 ;========================================================
 
 DECLARE_REG 0, rdi, edi, di,  dil, edi
 DECLARE_REG 1, rsi, esi, si,  sil, esi
@@ -295,9 +257,6 @@ DECLARE_REG 6, ebp, ebp, bp, null, [esp + stack_offset + 28]
             global %1
         %endif
     %endif
-%ifdef WIN64
-    %define %1 pad %1
-%endif
     align function_align
     %1:
     RESET_MM_PERMUTATION ; not really needed, but makes disassembly somewhat nicer



More information about the x264-devel mailing list