1 ;*****************************************************************************
2 ;* x86inc-64.asm: h264 encoder library
3 ;*****************************************************************************
4 ;* Copyright (C) 2005-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 ;*****************************************************************************
23 ; FIXME: All of the 64bit asm functions that take a stride as an argument
24 ; via register, assume that the high dword of that register is filled with 0.
25 ; This is true in practice (since we never do any 64bit arithmetic on strides,
26 ; and x264's strides are all positive), but is not guaranteed by the ABI.
28 ; Name of the .rodata section. On OS X we cannot use .rodata because YASM
29 ; is unable to compute address offsets outside of .text so we use the .text
30 ; section instead until YASM is fixed.
31 %macro SECTION_RODATA 0
32 %ifidn __OUTPUT_FORMAT__,macho64
33 SECTION .text align=16
35 SECTION .rodata align=16
39 ; PIC support macros. On x86_64 we just use RIP-relative addressing, which is
40 ; much simpler than the GOT handling we need to perform on x86.
42 ; - GLOBAL should be used as a suffix for global addressing, eg.
43 ; mov eax, [foo GLOBAL]
48 %define GLOBAL wrt rip