11b362b15af34006e6a11974088a46d42b903418eJohann/*
21b362b15af34006e6a11974088a46d42b903418eJohann *  Copyright (c) 2011 The WebM project authors. All Rights Reserved.
31b362b15af34006e6a11974088a46d42b903418eJohann *
41b362b15af34006e6a11974088a46d42b903418eJohann *  Use of this source code is governed by a BSD-style license
51b362b15af34006e6a11974088a46d42b903418eJohann *  that can be found in the LICENSE file in the root of the source
61b362b15af34006e6a11974088a46d42b903418eJohann *  tree. An additional intellectual property rights grant can be found
71b362b15af34006e6a11974088a46d42b903418eJohann *  in the file PATENTS.  All contributing project authors may
81b362b15af34006e6a11974088a46d42b903418eJohann *  be found in the AUTHORS file in the root of the source tree.
91b362b15af34006e6a11974088a46d42b903418eJohann */
101b362b15af34006e6a11974088a46d42b903418eJohann
111b362b15af34006e6a11974088a46d42b903418eJohann
12b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifndef VPX_PORTS_ASM_OFFSETS_H_
13b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#define VPX_PORTS_ASM_OFFSETS_H_
141b362b15af34006e6a11974088a46d42b903418eJohann
151b362b15af34006e6a11974088a46d42b903418eJohann#include <stddef.h>
161b362b15af34006e6a11974088a46d42b903418eJohann
171b362b15af34006e6a11974088a46d42b903418eJohann#define ct_assert(name,cond) \
18ba164dffc5a6795bce97fae02b51ccf3330e15e4hkuang  static void assert_##name(void) UNUSED;\
19ba164dffc5a6795bce97fae02b51ccf3330e15e4hkuang  static void assert_##name(void) {switch(0){case 0:case !!(cond):;}}
201b362b15af34006e6a11974088a46d42b903418eJohann
211b362b15af34006e6a11974088a46d42b903418eJohann#if INLINE_ASM
221b362b15af34006e6a11974088a46d42b903418eJohann#define DEFINE(sym, val) asm("\n" #sym " EQU %0" : : "i" (val))
231b362b15af34006e6a11974088a46d42b903418eJohann#define BEGIN int main(void) {
241b362b15af34006e6a11974088a46d42b903418eJohann#define END return 0; }
251b362b15af34006e6a11974088a46d42b903418eJohann#else
261b362b15af34006e6a11974088a46d42b903418eJohann#define DEFINE(sym, val) const int sym = val
271b362b15af34006e6a11974088a46d42b903418eJohann#define BEGIN
281b362b15af34006e6a11974088a46d42b903418eJohann#define END
291b362b15af34006e6a11974088a46d42b903418eJohann#endif
301b362b15af34006e6a11974088a46d42b903418eJohann
31b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif  // VPX_PORTS_ASM_OFFSETS_H_
32