Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Base.h
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Base.h
r48674 r58459 7 7 be used to implement base modules. 8 8 9 Copyright (c) 2006 - 201 2, Intel Corporation. All rights reserved.<BR>9 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 10 10 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> 11 11 This program and the accompanying materials … … 80 80 81 81 // 82 // For symbol name in GNU assembly code, an extra "_" is necessary 83 // 84 #if defined(__GNUC__) 85 /// 86 /// Private worker functions for ASM_PFX() 87 /// 88 #define _CONCATENATE(a, b) __CONCATENATE(a, b) 89 #define __CONCATENATE(a, b) a ## b 90 91 /// 92 /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix 93 /// on symbols in assembly language. 94 /// 95 #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) 96 #endif 82 // For symbol name in assembly code, an extra "_" is sometimes necessary 83 // 84 85 /// 86 /// Private worker functions for ASM_PFX() 87 /// 88 #define _CONCATENATE(a, b) __CONCATENATE(a, b) 89 #define __CONCATENATE(a, b) a ## b 90 91 /// 92 /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix 93 /// on symbols in assembly language. 94 /// 95 #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) 97 96 98 97 #if __APPLE__ … … 207 206 #define NULL ((VOID *) 0) 208 207 208 /// 209 /// Maximum values for common UEFI Data Types 210 /// 211 #define MAX_INT8 ((INT8)0x7F) 212 #define MAX_UINT8 ((UINT8)0xFF) 213 #define MAX_INT16 ((INT16)0x7FFF) 214 #define MAX_UINT16 ((UINT16)0xFFFF) 215 #define MAX_INT32 ((INT32)0x7FFFFFFF) 216 #define MAX_UINT32 ((UINT32)0xFFFFFFFF) 217 #define MAX_INT64 ((INT64)0x7FFFFFFFFFFFFFFFULL) 218 #define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL) 209 219 210 220 #define BIT0 0x00000001 … … 456 466 #define VA_END(Marker) ((void)0) 457 467 468 // For some ARM RVCT compilers, __va_copy is not defined 469 #ifndef __va_copy 470 #define __va_copy(dest, src) ((void)((dest) = (src))) 471 #endif 472 458 473 #define VA_COPY(Dest, Start) __va_copy (Dest, Start) 459 474 … … 1002 1017 (SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32)) 1003 1018 1019 #if defined(_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC) 1020 #pragma intrinsic(_ReturnAddress) 1021 /** 1022 Get the return address of the calling funcation. 1023 1024 Based on intrinsic function _ReturnAddress that provides the address of 1025 the instruction in the calling function that will be executed after 1026 control returns to the caller. 1027 1028 @param L Return Level. 1029 1030 @return The return address of the calling funcation or 0 if L != 0. 1031 1032 **/ 1033 #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0) 1034 #elif defined(__GNUC__) 1035 void * __builtin_return_address (unsigned int level); 1036 /** 1037 Get the return address of the calling funcation. 1038 1039 Based on built-in Function __builtin_return_address that returns 1040 the return address of the current function, or of one of its callers. 1041 1042 @param L Return Level. 1043 1044 @return The return address of the calling funcation. 1045 1046 **/ 1047 #define RETURN_ADDRESS(L) __builtin_return_address (L) 1048 #else 1049 /** 1050 Get the return address of the calling funcation. 1051 1052 @param L Return Level. 1053 1054 @return 0 as compilers don't support this feature. 1055 1056 **/ 1057 #define RETURN_ADDRESS(L) ((VOID *) 0) 1004 1058 #endif 1005 1059 1060 #endif 1061
Note:
See TracChangeset
for help on using the changeset viewer.