blob: 1c3f7a21c3df5964a63e621688b39ff1eea62373 [file] [log] [blame]
Julius Werner64b9ca92013-12-12 20:24:48 -08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2013 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef __ARM_ASM_H
21#define __ARM_ASM_H
22
23#if defined __arm__
24# define ARM(x...) x
25# define THUMB(x...)
26#elif defined __thumb__
27# define ARM(x...)
28# define THUMB(x...) x
29#else
30# error Not in ARM or thumb mode!
31#endif
32
33#define ALIGN .align 0
34
35#define ENDPROC(name) \
36 .type name, %function; \
37 END(name)
38
39#define ENTRY(name) \
40 .globl name; \
41 ALIGN; \
42 name:
43
44#define END(name) \
45 .size name, .-name
46
47#endif /* __ARM_ASM_H */