63f9e3224c2a659a9cc64ea767cefdffbfdfd40f
[libav.git] / libavcodec / bfin / config_bfin.h
1 /*
2 * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com>
3 *
4 * This file is part of Libav.
5 *
6 * Libav is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * Libav is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with Libav; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /*
22 * low level assembler interface wrapper
23 *
24 * DEFUN(put_pixels_clamped,mL1,
25 * (int16_t *block, uint8_t *dest, int line_size)):
26 *
27 * body
28 *
29 * rts;
30 */
31
32 #ifndef AVCODEC_BFIN_CONFIG_BFIN_H
33 #define AVCODEC_BFIN_CONFIG_BFIN_H
34
35 #include "config.h"
36
37 #ifndef DEFUN
38
39 #define mL3 .text
40 #ifndef mL1
41 #if defined(__FDPIC__) && CONFIG_SRAM
42 #define mL1 .l1.text
43 #else
44 #define mL1 mL3
45 #endif
46 #endif /* mL1 */
47
48 #define DEFUN(fname, where, interface) \
49 .section where; \
50 .global _ff_bfin_ ## fname; \
51 .type _ff_bfin_ ## fname, STT_FUNC; \
52 .align 8; \
53 _ff_bfin_ ## fname
54
55 #define DEFUN_END(fname) \
56 .size _ff_bfin_ ## fname, . - _ff_bfin_ ## fname
57
58 #ifdef __FDPIC__
59 #define RELOC(reg, got, obj) reg = [got + obj@GOT17M4]
60 #else
61 #define RELOC(reg, got, obj) reg.L = obj; reg.H = obj
62 #endif
63
64 #endif /* DEFUN */
65
66 #endif /* AVCODEC_BFIN_CONFIG_BFIN_H */