1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2019 - 2021, 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 DB 0xF3, 0x0F, 0x01, 0xEA
17 DB 0xF3, 0x0F, 0xAE, 0x30
21 DB 0xF3, 0x0F, 0x01, 0x28
25 DB 0xF3, 0x0F, 0x01, 0xE8
29 DB 0xF3, 0x48, 0x0F, 0x1E, 0xC8
33 DB 0xF3, 0x48, 0x0F, 0xAE, 0xE8
37 ; Macro for the PVALIDATE instruction, defined in AMD APM volume 3.
38 ; NASM feature request URL: https://bugzilla.nasm.us/show_bug.cgi?id=3392753
41 DB 0xF2, 0x0F, 0x01, 0xFF
44 ; NASM provides built-in macros STRUC and ENDSTRUC for structure definition.
45 ; For example, to define a structure called mytype containing a longword,
46 ; a word, a byte and a string of bytes, you might code
57 ; Below macros are help to map the C types and the RESB family of pseudo-instructions.
58 ; So that the above structure definition can be coded as
62 ; mt_long: CTYPE_UINT32 1
63 ; mt_word: CTYPE_UINT16 1
64 ; mt_byte: CTYPE_UINT8 1
65 ; mt_str: CTYPE_CHAR8 32
68 %define CTYPE_UINT64 resq
69 %define CTYPE_INT64 resq
70 %define CTYPE_UINT32 resd
71 %define CTYPE_INT32 resd
72 %define CTYPE_UINT16 resw
73 %define CTYPE_INT16 resw
74 %define CTYPE_BOOLEAN resb
75 %define CTYPE_UINT8 resb
76 %define CTYPE_CHAR8 resb
77 %define CTYPE_INT8 resb
79 %define CTYPE_UINTN resq
80 %define CTYPE_INTN resq