| OLD | NEW |
| 1 ; | 1 ; |
| 2 ; Copyright (c) 2010 The VP8 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 |
| 11 | 11 |
| 12 %include "vpx_config.asm" | 12 %include "vpx_config.asm" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 ; ALIGN_STACK <alignment> <register> | 84 ; ALIGN_STACK <alignment> <register> |
| 85 ; This macro aligns the stack to the given alignment (in bytes). The stack | 85 ; This macro aligns the stack to the given alignment (in bytes). The stack |
| 86 ; is left such that the previous value of the stack pointer is the first | 86 ; is left such that the previous value of the stack pointer is the first |
| 87 ; argument on the stack (ie, the inverse of this macro is 'pop rsp.') | 87 ; argument on the stack (ie, the inverse of this macro is 'pop rsp.') |
| 88 ; This macro uses one temporary register, which is not preserved, and thus | 88 ; This macro uses one temporary register, which is not preserved, and thus |
| 89 ; must be specified as an argument. | 89 ; must be specified as an argument. |
| 90 %macro ALIGN_STACK 2 | 90 %macro ALIGN_STACK 2 |
| 91 mov %2, rsp | 91 mov %2, rsp |
| 92 and rsp, -%1 | 92 and rsp, -%1 |
| 93 sub rsp, %1 - REG_SZ_BYTES | 93 lea rsp, [rsp - (%1 - REG_SZ_BYTES)] |
| 94 push %2 | 94 push %2 |
| 95 %endmacro | 95 %endmacro |
| 96 | 96 |
| 97 | 97 |
| 98 ; | 98 ; |
| 99 ; The Microsoft assembler tries to impose a certain amount of type safety in | 99 ; The Microsoft assembler tries to impose a certain amount of type safety in |
| 100 ; its register usage. YASM doesn't recognize these directives, so we just | 100 ; its register usage. YASM doesn't recognize these directives, so we just |
| 101 ; %define them away to maintain as much compatibility as possible with the | 101 ; %define them away to maintain as much compatibility as possible with the |
| 102 ; original inline assembler we're porting from. | 102 ; original inline assembler we're porting from. |
| 103 ; | 103 ; |
| 104 %idefine PTR | 104 %idefine PTR |
| 105 %idefine XMMWORD | 105 %idefine XMMWORD |
| 106 %idefine MMWORD | 106 %idefine MMWORD |
| 107 | 107 |
| 108 | |
| 109 ; PIC macros | 108 ; PIC macros |
| 110 ; | 109 ; |
| 111 %if ABI_IS_32BIT | 110 %if ABI_IS_32BIT |
| 112 %if CONFIG_PIC=1 | 111 %if CONFIG_PIC=1 |
| 113 %ifidn __OUTPUT_FORMAT__,elf32 | 112 %ifidn __OUTPUT_FORMAT__,elf32 |
| 114 %define WRT_PLT wrt ..plt | 113 %define WRT_PLT wrt ..plt |
| 115 %macro GET_GOT 1 | 114 %macro GET_GOT 1 |
| 116 extern _GLOBAL_OFFSET_TABLE_ | 115 extern _GLOBAL_OFFSET_TABLE_ |
| 117 push %1 | 116 push %1 |
| 118 call %%get_got | 117 call %%get_got |
| 118 %%sub_offset: |
| 119 jmp %%exitGG |
| 119 %%get_got: | 120 %%get_got: |
| 120 pop %1 | 121 mov %1, [esp] |
| 121 add %1, _GLOBAL_OFFSET_TABLE_ + $$ - %%get_got wrt ..gotpc | 122 add %1, _GLOBAL_OFFSET_TABLE_ + $$ - %%sub_offset wrt ..gotpc |
| 123 ret |
| 124 %%exitGG: |
| 122 %undef GLOBAL | 125 %undef GLOBAL |
| 123 %define GLOBAL + %1 wrt ..gotoff | 126 %define GLOBAL + %1 wrt ..gotoff |
| 124 %undef RESTORE_GOT | 127 %undef RESTORE_GOT |
| 125 %define RESTORE_GOT pop %1 | 128 %define RESTORE_GOT pop %1 |
| 126 %endmacro | 129 %endmacro |
| 127 %elifidn __OUTPUT_FORMAT__,macho32 | 130 %elifidn __OUTPUT_FORMAT__,macho32 |
| 128 %macro GET_GOT 1 | 131 %macro GET_GOT 1 |
| 129 push %1 | 132 push %1 |
| 130 call %%get_got | 133 call %%get_got |
| 134 %%sub_offset: |
| 135 jmp %%exitGG |
| 131 %%get_got: | 136 %%get_got: |
| 132 pop %1 | 137 mov %1, [esp] |
| 133 add %1, fake_got - %%get_got | 138 add %1, fake_got - %%sub_offset |
| 139 ret |
| 140 %%exitGG: |
| 134 %undef GLOBAL | 141 %undef GLOBAL |
| 135 %define GLOBAL + %1 - fake_got | 142 %define GLOBAL + %1 - fake_got |
| 136 %undef RESTORE_GOT | 143 %undef RESTORE_GOT |
| 137 %define RESTORE_GOT pop %1 | 144 %define RESTORE_GOT pop %1 |
| 138 %endmacro | 145 %endmacro |
| 139 %endif | 146 %endif |
| 140 %endif | 147 %endif |
| 141 %define HIDDEN_DATA(x) x | 148 %define HIDDEN_DATA(x) x |
| 142 %else | 149 %else |
| 143 %macro GET_GOT 1 | 150 %macro GET_GOT 1 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 261 |
| 255 ; Tell GNU ld that we don't require an executable stack. | 262 ; Tell GNU ld that we don't require an executable stack. |
| 256 %ifidn __OUTPUT_FORMAT__,elf32 | 263 %ifidn __OUTPUT_FORMAT__,elf32 |
| 257 section .note.GNU-stack noalloc noexec nowrite progbits | 264 section .note.GNU-stack noalloc noexec nowrite progbits |
| 258 section .text | 265 section .text |
| 259 %elifidn __OUTPUT_FORMAT__,elf64 | 266 %elifidn __OUTPUT_FORMAT__,elf64 |
| 260 section .note.GNU-stack noalloc noexec nowrite progbits | 267 section .note.GNU-stack noalloc noexec nowrite progbits |
| 261 section .text | 268 section .text |
| 262 %endif | 269 %endif |
| 263 | 270 |
| OLD | NEW |