stoneyridge: Enable legacy IO
[coreboot.git] / src / include / compiler.h
blobe088eb1a51c4c787a2954a8d67c94d702a892fde
1 /*
2 * This file is part of the coreboot project.
4 * Copyright 2017 Google Inc.
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.
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.
16 #ifndef __COMPILER_H__
17 #define __COMPILER_H__
19 #if defined(__WIN32) || defined(__WIN64)
20 #define __packed __attribute__((gcc_struct, packed))
21 #else
22 #define __packed __attribute__((packed))
23 #endif
25 #define __aligned(x) __attribute__((aligned(x)))
26 #define __always_unused __attribute__((unused))
27 #define __must_check __attribute__((warn_unused_result))
28 #define __weak __attribute__((weak))
30 #endif