1 /*++ 2 3 Copyright (c) 2016 Pete Batard <pete@akeo.ie> 4 5 Module Name: 6 7 eficompiler.h 8 9 Abstract: 10 11 Compiler specific adjustments 12 13 --*/ 14 15 #ifdef _MSC_EXTENSIONS 16 #define EFI_UNUSED 17 #else 18 #define EFI_UNUSED __attribute__((__unused__)) 19 #endif 20 21 #ifdef _MSC_EXTENSIONS 22 #define EFI_NO_TAIL_CALL 23 #else 24 #ifdef __clang__ 25 #define EFI_NO_TAIL_CALL __attribute__((disable_tail_calls)) 26 #else 27 #define EFI_NO_TAIL_CALL __attribute__((optimize("no-optimize-sibling-calls"))) 28 #endif 29 #endif 30 31 #ifdef _MSC_EXTENSIONS 32 #define ALIGN(x) __declspec(align(x)) 33 #else 34 #define ALIGN(x) __attribute__((__aligned__(x))) 35 #endif 36 37 /* Also add a catch-all on __attribute__() for MS compilers */ 38 #ifdef _MSC_EXTENSIONS 39 #define __attribute__(x) 40 #endif 41