X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkCompatibilityPkg%2FFoundation%2FInclude%2FIa32%2FEfiBind.h;h=12d7154d0baef7754124cbf5290523d41869fb3d;hp=7c3c585b9e4fe528d3e05aafd4ed8d390d06a238;hb=e8de46808a7d2426116de79cdf2aeab43d5a5537;hpb=b9b478088b18cf3f4d3edcf94198eb0ba7f1b7ee diff --git a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h index 7c3c585b9e..12d7154d0b 100644 --- a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h @@ -83,7 +83,9 @@ Abstract: // // Make sure we are useing the correct packing rules per EFI specification // +#ifndef __GNUC__ #pragma pack() +#endif #if __INTEL_COMPILER // @@ -114,6 +116,12 @@ Abstract: // #pragma warning ( disable : 1419 ) +// +// Disable ICC's remark #869: "Parameter" was never referenced warning. +// This is legal ANSI C code so we disable the remark that is turned on with -Wall +// +#pragma warning ( disable : 869 ) + #endif @@ -235,7 +243,12 @@ typedef int32_t intn_t; // compiler will optimize away the rest of the function following, so that you run out in // the weeds if you skip over it with a debugger. // +#ifdef _MSC_EXTENSIONS #define EFI_BREAKPOINT() __asm { int 3 } +#elif __GNUC__ +#define EFI_BREAKPOINT() asm(" int $3"); +#endif + #define EFI_DEADLOOP() { volatile UINTN __iii; __iii = 1; while (__iii); } // @@ -295,7 +308,23 @@ typedef int32_t intn_t; #endif +// +// For symbol name in GNU assembly code, an extra "_" is necessary +// +#if defined(__GNUC__) + /// + /// Private worker functions for ASM_PFX() + /// + #define _CONCATENATE(a, b) __CONCATENATE(a, b) + #define __CONCATENATE(a, b) a ## b + /// + /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix + /// on symbols in assembly language. + /// + #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) + +#endif #endif