Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: media/base/simd/media_export.asm

Issue 15151002: Streamline SIMD targets in media.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Win64 hack. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm ('k') | media/base/simd/scale_yuv_to_rgb_mmx.inc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/simd/media_export.asm
diff --git a/media/base/simd/media_export.asm b/media/base/simd/media_export.asm
new file mode 100644
index 0000000000000000000000000000000000000000..e82be8d7f9d7bd1624f41505ef1e3de9e6fcb5b8
--- /dev/null
+++ b/media/base/simd/media_export.asm
@@ -0,0 +1,48 @@
+; Copyright 2013 The Chromium Authors. All rights reserved.
+; Use of this source code is governed by a BSD-style license that can be
+; found in the LICENSE file.
+;
+; A set of helper macros for controlling symbol visibility.
+;
+
+%ifndef MEDIA_BASE_SIMD_MEDIA_EXPORT_ASM_
+%define MEDIA_BASE_SIMD_MEDIA_EXPORT_ASM_
+
+; Necessary for the mangle() macro.
+%include "third_party/x86inc/x86inc.asm"
+
+;
+; PRIVATE
+; A flag representing the specified symbol is a private symbol. This define adds
+; a hidden flag on Linux and a private_extern flag on Mac. (We can use this
+; private_extern flag only on the latest yasm.)
+;
+%ifdef MACHO
+%define PRIVATE :private_extern
+%elifdef ELF
+%define PRIVATE :hidden
+%else
+%define PRIVATE
+%endif
+
+;
+; EXPORT %1
+; Designates a symbol as PRIVATE if EXPORT_SYMBOLS is not set.
+;
+%macro EXPORT 1
+%ifdef EXPORT_SYMBOLS
+global mangle(%1)
+
+; Windows needs an additional export declaration.
+%ifidn __OUTPUT_FORMAT__,win32
+export mangle(%1)
+%elifidn __OUTPUT_FORMAT__,win64
+export mangle(%1)
+%endif
+
+%else
+global mangle(%1) PRIVATE
+%endif
+%endmacro
+
+%endif ; MEDIA_BASE_SIMD_MEDIA_EXPORT_ASM_
« no previous file with comments | « media/base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm ('k') | media/base/simd/scale_yuv_to_rgb_mmx.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698