1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
8 ; This file provides macro definitions for NASM files.
10 ;------------------------------------------------------------------------------
12 ; NASM provides built-in macros STRUC and ENDSTRUC for structure definition.
13 ; For example, to define a structure called mytype containing a longword,
14 ; a word, a byte and a string of bytes, you might code
25 ; Below macros are help to map the C types and the RESB family of pseudo-instructions.
26 ; So that the above structure definition can be coded as
30 ; mt_long: CTYPE_UINT32 1
31 ; mt_word: CTYPE_UINT16 1
32 ; mt_byte: CTYPE_UINT8 1
33 ; mt_str: CTYPE_CHAR8 32
36 %define CTYPE_UINT64 resq
37 %define CTYPE_INT64 resq
38 %define CTYPE_UINT32 resd
39 %define CTYPE_INT32 resd
40 %define CTYPE_UINT16 resw
41 %define CTYPE_INT16 resw
42 %define CTYPE_BOOLEAN resb
43 %define CTYPE_UINT8 resb
44 %define CTYPE_CHAR8 resb
45 %define CTYPE_INT8 resb
47 %define CTYPE_UINTN resd
48 %define CTYPE_INTN resd