OLD | NEW |
(Empty) | |
| 1 ; Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 ; Use of this source code is governed by a BSD-style license that can be |
| 3 ; found in the LICENSE file. |
| 4 ; |
| 5 ; A set of helper macros for controlling symbol visibility. |
| 6 ; |
| 7 |
| 8 %ifndef MEDIA_BASE_SIMD_MEDIA_EXPORT_ASM_ |
| 9 %define MEDIA_BASE_SIMD_MEDIA_EXPORT_ASM_ |
| 10 |
| 11 ; Necessary for the mangle() macro. |
| 12 %include "third_party/x86inc/x86inc.asm" |
| 13 |
| 14 ; |
| 15 ; PRIVATE |
| 16 ; A flag representing the specified symbol is a private symbol. This define adds |
| 17 ; a hidden flag on Linux and a private_extern flag on Mac. (We can use this |
| 18 ; private_extern flag only on the latest yasm.) |
| 19 ; |
| 20 %ifdef MACHO |
| 21 %define PRIVATE :private_extern |
| 22 %elifdef ELF |
| 23 %define PRIVATE :hidden |
| 24 %else |
| 25 %define PRIVATE |
| 26 %endif |
| 27 |
| 28 ; |
| 29 ; EXPORT %1 |
| 30 ; Designates a symbol as PRIVATE if EXPORT_SYMBOLS is not set. |
| 31 ; |
| 32 %macro EXPORT 1 |
| 33 %ifdef EXPORT_SYMBOLS |
| 34 global mangle(%1) |
| 35 |
| 36 ; Windows needs an additional export declaration. |
| 37 %ifidn __OUTPUT_FORMAT__,win32 |
| 38 export mangle(%1) |
| 39 %elifidn __OUTPUT_FORMAT__,win64 |
| 40 export mangle(%1) |
| 41 %endif |
| 42 |
| 43 %else |
| 44 global mangle(%1) PRIVATE |
| 45 %endif |
| 46 %endmacro |
| 47 |
| 48 %endif ; MEDIA_BASE_SIMD_MEDIA_EXPORT_ASM_ |
OLD | NEW |