]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Ebc/ProcessorBind.h
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@592 6f19259b...
[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 Module Name: ProcessorBind.h
17
18 **/
19
20 #ifndef __PROCESSOR_BIND_H__
21 #define __PROCESSOR_BIND_H__
22
23 //
24 // Define the processor type so other code can make processor based choices
25 //
26 #define MDE_CPU_EBC
27
28 //
29 // Native integer types
30 //
31 typedef char INT8;
32 typedef unsigned char BOOLEAN;
33 typedef unsigned char UINT8;
34 typedef unsigned char CHAR8;
35
36 typedef short INT16;
37 typedef unsigned short UINT16;
38 typedef unsigned short CHAR16;
39
40 typedef int INT32;
41 typedef unsigned int UINT32;
42
43 typedef __int64 INT64;
44 typedef unsigned __int64 UINT64;
45
46 //
47 // "long" type scales to the processor native size with EBC compiler
48 //
49 typedef long INTN;
50 typedef unsigned long UINTN;
51
52 #define UINT8_MAX 0xff
53
54 //
55 // Scalable macro to set the most significant bit in a natural number
56 //
57 #define MAX_BIT 0x8000000000000000ULL
58 #define MAX_2_BITS 0xC000000000000000ULL
59
60
61 //
62 // Maximum legal EBC address
63 //
64 #define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
65
66 //
67 // Modifier to ensure that all protocol member functions and EFI intrinsics
68 // use the correct C calling convention. All protocol member functions and
69 // EFI intrinsics are required to modify thier member functions with EFIAPI.
70 //
71 #define EFIAPI
72
73 //
74 // The Microsoft* C compiler can removed references to unreferenced data items
75 // if the /OPT:REF linker option is used. We defined a macro as this is a
76 // a non standard extension. Currently not supported by the EBC compiler
77 //
78 #define GLOBAL_REMOVE_IF_UNREFERENCED
79
80 #endif
81