| OLD | NEW | 
|---|
| 1 ; | 1 ; | 
| 2 ;  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 ;  Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 
| 3 ; | 3 ; | 
| 4 ;  Use of this source code is governed by a BSD-style license | 4 ;  Use of this source code is governed by a BSD-style license | 
| 5 ;  that can be found in the LICENSE file in the root of the source | 5 ;  that can be found in the LICENSE file in the root of the source | 
| 6 ;  tree. An additional intellectual property rights grant can be found | 6 ;  tree. An additional intellectual property rights grant can be found | 
| 7 ;  in the file PATENTS.  All contributing project authors may | 7 ;  in the file PATENTS.  All contributing project authors may | 
| 8 ;  be found in the AUTHORS file in the root of the source tree. | 8 ;  be found in the AUTHORS file in the root of the source tree. | 
| 9 ; | 9 ; | 
| 10 | 10 | 
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 140 ; | 140 ; | 
| 141 %idefine PTR | 141 %idefine PTR | 
| 142 %idefine XMMWORD | 142 %idefine XMMWORD | 
| 143 %idefine MMWORD | 143 %idefine MMWORD | 
| 144 | 144 | 
| 145 ; PIC macros | 145 ; PIC macros | 
| 146 ; | 146 ; | 
| 147 %if ABI_IS_32BIT | 147 %if ABI_IS_32BIT | 
| 148   %if CONFIG_PIC=1 | 148   %if CONFIG_PIC=1 | 
| 149   %ifidn __OUTPUT_FORMAT__,elf32 | 149   %ifidn __OUTPUT_FORMAT__,elf32 | 
|  | 150     %define GET_GOT_SAVE_ARG 1 | 
| 150     %define WRT_PLT wrt ..plt | 151     %define WRT_PLT wrt ..plt | 
| 151     %macro GET_GOT 1 | 152     %macro GET_GOT 1 | 
| 152       extern _GLOBAL_OFFSET_TABLE_ | 153       extern _GLOBAL_OFFSET_TABLE_ | 
| 153       push %1 | 154       push %1 | 
| 154       call %%get_got | 155       call %%get_got | 
| 155       %%sub_offset: | 156       %%sub_offset: | 
| 156       jmp %%exitGG | 157       jmp %%exitGG | 
| 157       %%get_got: | 158       %%get_got: | 
| 158       mov %1, [esp] | 159       mov %1, [esp] | 
| 159       add %1, _GLOBAL_OFFSET_TABLE_ + $$ - %%sub_offset wrt ..gotpc | 160       add %1, _GLOBAL_OFFSET_TABLE_ + $$ - %%sub_offset wrt ..gotpc | 
| 160       ret | 161       ret | 
| 161       %%exitGG: | 162       %%exitGG: | 
| 162       %undef GLOBAL | 163       %undef GLOBAL | 
| 163       %define GLOBAL(x) x + %1 wrt ..gotoff | 164       %define GLOBAL(x) x + %1 wrt ..gotoff | 
| 164       %undef RESTORE_GOT | 165       %undef RESTORE_GOT | 
| 165       %define RESTORE_GOT pop %1 | 166       %define RESTORE_GOT pop %1 | 
| 166     %endmacro | 167     %endmacro | 
| 167   %elifidn __OUTPUT_FORMAT__,macho32 | 168   %elifidn __OUTPUT_FORMAT__,macho32 | 
|  | 169     %define GET_GOT_SAVE_ARG 1 | 
| 168     %macro GET_GOT 1 | 170     %macro GET_GOT 1 | 
| 169       push %1 | 171       push %1 | 
| 170       call %%get_got | 172       call %%get_got | 
| 171       %%get_got: | 173       %%get_got: | 
| 172       pop  %1 | 174       pop  %1 | 
| 173       %undef GLOBAL | 175       %undef GLOBAL | 
| 174       %define GLOBAL(x) x + %1 - %%get_got | 176       %define GLOBAL(x) x + %1 - %%get_got | 
| 175       %undef RESTORE_GOT | 177       %undef RESTORE_GOT | 
| 176       %define RESTORE_GOT pop %1 | 178       %define RESTORE_GOT pop %1 | 
| 177     %endmacro | 179     %endmacro | 
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 248         mov rax,[rbp+off] | 250         mov rax,[rbp+off] | 
| 249         push rax | 251         push rax | 
| 250         %assign off off+8 | 252         %assign off off+8 | 
| 251       %endrep | 253       %endrep | 
| 252     %endif | 254     %endif | 
| 253   %endm | 255   %endm | 
| 254 %endif | 256 %endif | 
| 255   %define UNSHADOW_ARGS mov rsp, rbp | 257   %define UNSHADOW_ARGS mov rsp, rbp | 
| 256 %endif | 258 %endif | 
| 257 | 259 | 
| 258 ; must keep XMM6:XMM15 (libvpx uses XMM6 and XMM7) on Win64 ABI | 260 ; Win64 ABI requires that XMM6:XMM15 are callee saved | 
| 259 ; rsp register has to be aligned | 261 ; SAVE_XMM n, [u] | 
|  | 262 ; store registers 6-n on the stack | 
|  | 263 ; if u is specified, use unaligned movs. | 
|  | 264 ; Win64 ABI requires 16 byte stack alignment, but then pushes an 8 byte return | 
|  | 265 ; value. Typically we follow this up with 'push rbp' - re-aligning the stack - | 
|  | 266 ; but in some cases this is not done and unaligned movs must be used. | 
| 260 %ifidn __OUTPUT_FORMAT__,x64 | 267 %ifidn __OUTPUT_FORMAT__,x64 | 
| 261 %macro SAVE_XMM 0 | 268 %macro SAVE_XMM 1-2 a | 
| 262   sub rsp, 32 | 269   %if %1 < 6 | 
| 263   movdqa XMMWORD PTR [rsp], xmm6 | 270     %error Only xmm registers 6-15 must be preserved | 
| 264   movdqa XMMWORD PTR [rsp+16], xmm7 | 271   %else | 
|  | 272     %assign last_xmm %1 | 
|  | 273     %define movxmm movdq %+ %2 | 
|  | 274     %assign xmm_stack_space ((last_xmm - 5) * 16) | 
|  | 275     sub rsp, xmm_stack_space | 
|  | 276     %assign i 6 | 
|  | 277     %rep (last_xmm - 5) | 
|  | 278       movxmm [rsp + ((i - 6) * 16)], xmm %+ i | 
|  | 279       %assign i i+1 | 
|  | 280     %endrep | 
|  | 281   %endif | 
| 265 %endmacro | 282 %endmacro | 
| 266 %macro RESTORE_XMM 0 | 283 %macro RESTORE_XMM 0 | 
| 267   movdqa xmm6, XMMWORD PTR [rsp] | 284   %ifndef last_xmm | 
| 268   movdqa xmm7, XMMWORD PTR [rsp+16] | 285     %error RESTORE_XMM must be paired with SAVE_XMM n | 
| 269   add rsp, 32 | 286   %else | 
|  | 287     %assign i last_xmm | 
|  | 288     %rep (last_xmm - 5) | 
|  | 289       movxmm xmm %+ i, [rsp +((i - 6) * 16)] | 
|  | 290       %assign i i-1 | 
|  | 291     %endrep | 
|  | 292     add rsp, xmm_stack_space | 
|  | 293     ; there are a couple functions which return from multiple places. | 
|  | 294     ; otherwise, we could uncomment these: | 
|  | 295     ; %undef last_xmm | 
|  | 296     ; %undef xmm_stack_space | 
|  | 297     ; %undef movxmm | 
|  | 298   %endif | 
| 270 %endmacro | 299 %endmacro | 
| 271 %else | 300 %else | 
| 272 %macro SAVE_XMM 0 | 301 %macro SAVE_XMM 1-2 | 
| 273 %endmacro | 302 %endmacro | 
| 274 %macro RESTORE_XMM 0 | 303 %macro RESTORE_XMM 0 | 
| 275 %endmacro | 304 %endmacro | 
| 276 %endif | 305 %endif | 
| 277 | 306 | 
| 278 ; Name of the rodata section | 307 ; Name of the rodata section | 
| 279 ; | 308 ; | 
| 280 ; .rodata seems to be an elf-ism, as it doesn't work on OSX. | 309 ; .rodata seems to be an elf-ism, as it doesn't work on OSX. | 
| 281 ; | 310 ; | 
| 282 %ifidn __OUTPUT_FORMAT__,macho64 | 311 %ifidn __OUTPUT_FORMAT__,macho64 | 
| 283 %define SECTION_RODATA section .text | 312 %define SECTION_RODATA section .text | 
| 284 %elifidn __OUTPUT_FORMAT__,macho32 | 313 %elifidn __OUTPUT_FORMAT__,macho32 | 
| 285 %macro SECTION_RODATA 0 | 314 %macro SECTION_RODATA 0 | 
| 286 section .text | 315 section .text | 
| 287 %endmacro | 316 %endmacro | 
| 288 %else | 317 %else | 
| 289 %define SECTION_RODATA section .rodata | 318 %define SECTION_RODATA section .rodata | 
| 290 %endif | 319 %endif | 
| 291 | 320 | 
| 292 | 321 | 
| 293 ; Tell GNU ld that we don't require an executable stack. | 322 ; Tell GNU ld that we don't require an executable stack. | 
| 294 %ifidn __OUTPUT_FORMAT__,elf32 | 323 %ifidn __OUTPUT_FORMAT__,elf32 | 
| 295 section .note.GNU-stack noalloc noexec nowrite progbits | 324 section .note.GNU-stack noalloc noexec nowrite progbits | 
| 296 section .text | 325 section .text | 
| 297 %elifidn __OUTPUT_FORMAT__,elf64 | 326 %elifidn __OUTPUT_FORMAT__,elf64 | 
| 298 section .note.GNU-stack noalloc noexec nowrite progbits | 327 section .note.GNU-stack noalloc noexec nowrite progbits | 
| 299 section .text | 328 section .text | 
| 300 %endif | 329 %endif | 
| 301 | 330 | 
| OLD | NEW | 
|---|