1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vpx_ports/asm_offsets.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +/* 1.5 + * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#ifndef VPX_PORTS_ASM_OFFSETS_H 1.16 +#define VPX_PORTS_ASM_OFFSETS_H 1.17 + 1.18 +#include <stddef.h> 1.19 + 1.20 +#define ct_assert(name,cond) \ 1.21 + static void assert_##name(void) UNUSED;\ 1.22 + static void assert_##name(void) {switch(0){case 0:case !!(cond):;}} 1.23 + 1.24 +#if INLINE_ASM 1.25 +#define DEFINE(sym, val) asm("\n" #sym " EQU %0" : : "i" (val)) 1.26 +#define BEGIN int main(void) { 1.27 +#define END return 0; } 1.28 +#else 1.29 +#define DEFINE(sym, val) const int sym = val 1.30 +#define BEGIN 1.31 +#define END 1.32 +#endif 1.33 + 1.34 +#endif /* VPX_PORTS_ASM_OFFSETS_H */