michael@0: /* michael@0: * Copyright (c) 2011 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #ifndef VPX_PORTS_ASM_OFFSETS_H michael@0: #define VPX_PORTS_ASM_OFFSETS_H michael@0: michael@0: #include michael@0: michael@0: #define ct_assert(name,cond) \ michael@0: static void assert_##name(void) UNUSED;\ michael@0: static void assert_##name(void) {switch(0){case 0:case !!(cond):;}} michael@0: michael@0: #if INLINE_ASM michael@0: #define DEFINE(sym, val) asm("\n" #sym " EQU %0" : : "i" (val)) michael@0: #define BEGIN int main(void) { michael@0: #define END return 0; } michael@0: #else michael@0: #define DEFINE(sym, val) const int sym = val michael@0: #define BEGIN michael@0: #define END michael@0: #endif michael@0: michael@0: #endif /* VPX_PORTS_ASM_OFFSETS_H */