2 // Copyright (c) Microsoft. All rights reserved.
3 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
6 #define INVALIDGCVALUE -0x33333333 // 0CCCCCCCDh - the assembler considers it to be a signed integer constant
9 #define C_FUNC(name) _##name
10 #define EXTERNAL_C_FUNC(name) C_FUNC(name)
11 #define LOCAL_LABEL(name) L##name
13 #define C_FUNC(name) name
14 #define EXTERNAL_C_FUNC(name) C_FUNC(name)@plt
15 #define LOCAL_LABEL(name) .L##name
18 #if defined(__APPLE__)
19 #define C_PLTFUNC(name) _##name
21 #define C_PLTFUNC(name) name@PLT
24 .macro LEAF_END Name, Section
25 LEAF_END_MARKED \Name, \Section
28 .macro NESTED_ENTRY Name, Section, Handler
29 LEAF_ENTRY \Name, \Section
30 .ifnc \Handler, NoHandler
31 #if defined(__APPLE__)
32 .cfi_personality 0x9b, C_FUNC(\Handler) // 0x9b == DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4
34 .cfi_personality 0, C_FUNC(\Handler) // 0 == DW_EH_PE_absptr
39 .macro NESTED_END Name, Section
40 LEAF_END \Name, \Section
41 #if defined(__APPLE__)
42 .section __LD,__compact_unwind,regular,debug
44 .set C_FUNC(\Name\()_Size), C_FUNC(\Name\()_End) - C_FUNC(\Name)
45 .long C_FUNC(\Name\()_Size)
46 .long 0x04000000 # DWARF
55 .macro SETALIAS New, Old
60 #include "unixasmmacrosamd64.inc"
62 #include "unixasmmacrosarm.inc"