]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Ebc/ProcessorBind.h
Add FUNCTION_ENTRY_POINT macro
[mirror_edk2.git] / MdePkg / Include / Ebc / ProcessorBind.h
1 /** @file
2 Processor or compiler specific defines and types for EBC.
3
4 We currently only have one EBC complier so there may be some Intel compiler
5 specific functions in this file.
6
7 Copyright (c) 2006, Intel Corporation
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
12
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15
16 **/
17
18 #ifndef __PROCESSOR_BIND_H__
19 #define __PROCESSOR_BIND_H__
20
21 //
22 // Define the processor type so other code can make processor based choices
23 //
24 #define MDE_CPU_EBC
25
26 //
27 // Native integer types
28 //
29 typedef char INT8;
30 typedef unsigned char BOOLEAN;
31 typedef unsigned char UINT8;
32 typedef unsigned char CHAR8;
33
34 typedef short INT16;
35 typedef unsigned short UINT16;
36 typedef unsigned short CHAR16;
37
38 typedef int INT32;
39 typedef unsigned int UINT32;
40
41 typedef __int64 INT64;
42 typedef unsigned __int64 UINT64;
43
44 //
45 // "long" type scales to the processor native size with EBC compiler
46 //
47 typedef long INTN;
48 typedef unsigned long UINTN;
49
50 #define UINT8_MAX 0xff
51
52 //
53 // Scalable macro to set the most significant bit in a natural number
54 //
55 #define MAX_BIT (1ULL << (sizeof (INTN) * 8 - 1))
56 #define MAX_2_BITS (3ULL << (sizeof (INTN) * 8 - 2))
57
58 //
59 // Maximum legal EBC address
60 //
61 #define MAX_ADDRESS ((UINTN) ~0)
62
63 //
64 // The stack alignment required for EBC
65 //
66 #define CPU_STACK_ALIGNMENT sizeof(UINTN)
67
68 //
69 // Modifier to ensure that all protocol member functions and EFI intrinsics
70 // use the correct C calling convention. All protocol member functions and
71 // EFI intrinsics are required to modify thier member functions with EFIAPI.
72 //
73 #define EFIAPI
74
75 //
76 // The Microsoft* C compiler can removed references to unreferenced data items
77 // if the /OPT:REF linker option is used. We defined a macro as this is a
78 // a non standard extension. Currently not supported by the EBC compiler
79 //
80 #define GLOBAL_REMOVE_IF_UNREFERENCED
81
82 #define FUNCTION_ENTRY_POINT(p) (p)
83
84 #endif
85