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;------------------------------------------------------------------------------
13; Macro
for the PVALIDATE instruction, defined in AMD APM volume 3.
14; NASM feature request URL: https:
17 DB 0xF2, 0x0F, 0x01, 0xFF
21; Macro
for the RMPADJUST instruction, defined in AMD APM volume 3.
22; NASM feature request URL: https:
25 DB 0xF3, 0x0F, 0x01, 0xFE
28; NASM provides built-in macros STRUC and ENDSTRUC
for structure definition.
29; For example, to define a structure called mytype containing a longword,
30; a word, a
byte and a
string of bytes, you might code
41; Below macros are help to map the C types and the RESB family of pseudo-instructions.
42; So that the above structure definition can be coded as
46; mt_long: CTYPE_UINT32 1
47; mt_word: CTYPE_UINT16 1
48; mt_byte: CTYPE_UINT8 1
49; mt_str: CTYPE_CHAR8 32
52%define CTYPE_UINT64 resq
53%define CTYPE_INT64 resq
54%define CTYPE_UINT32 resd
55%define CTYPE_INT32 resd
56%define CTYPE_UINT16 resw
57%define CTYPE_INT16 resw
58%define CTYPE_BOOLEAN resb
59%define CTYPE_UINT8 resb
60%define CTYPE_CHAR8 resb
61%define CTYPE_INT8 resb
63%define CTYPE_UINTN resq
64%define CTYPE_INTN resq