compiler.h (527B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2019 Arm Limited 4 * Original author: Dave Martin <Dave.Martin@arm.com> 5 */ 6 7#ifndef COMPILER_H 8#define COMPILER_H 9 10#define __always_unused __attribute__((__unused__)) 11#define __noreturn __attribute__((__noreturn__)) 12#define __unreachable() __builtin_unreachable() 13 14/* curse(e) has value e, but the compiler cannot assume so */ 15#define curse(e) ({ \ 16 __typeof__(e) __curse_e = (e); \ 17 asm ("" : "+r" (__curse_e)); \ 18 __curse_e; \ 19}) 20 21#endif /* ! COMPILER_H */