Mercurial > pub > dyncall > dyncall
comparison portasm/portasm-arm64.S @ 371:451299d50c1a
- windows arm64 support (dyncall, dyncallback, cmake support for armasm64), thanks Bernhard Urban-Forster!
- minor cleanups
author | Tassilo Philipp |
---|---|
date | Fri, 25 Dec 2020 18:07:39 +0100 |
parents | |
children | 7d9f526dc2ad |
comparison
equal
deleted
inserted
replaced
370:fa78490381f3 | 371:451299d50c1a |
---|---|
1 /* | |
2 | |
3 Package: dyncall | |
4 Library: portasm | |
5 File: portasm/portasm-arm.S | |
6 Description: | |
7 License: | |
8 | |
9 Copyright (c) 2020 Bernhard Urban-Forster <beurba@microsoft.com> | |
10 | |
11 Permission to use, copy, modify, and distribute this software for any | |
12 purpose with or without fee is hereby granted, provided that the above | |
13 copyright notice and this permission notice appear in all copies. | |
14 | |
15 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
16 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
17 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
18 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
20 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
21 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
22 | |
23 */ | |
24 | |
25 | |
26 | |
27 #define BEGIN_ASM | |
28 #include "../autovar/autovar_OS.h" | |
29 | |
30 #if defined(GEN_MASM) | |
31 #define TEXTAREA AREA .text, CODE, ARM64 | |
32 #define ALIGN(X) | |
33 #define LABELDEF(X) dcCall_arm64_##X | |
34 #define LABELUSE(X) dcCall_arm64_##X | |
35 #define END_PROC ENDP | |
36 #define END_ASM END | |
37 #define GLOBAL_C(X) EXPORT X | |
38 #define ENTRY_C(X) X PROC | |
39 | |
40 #else | |
41 | |
42 #define TEXTAREA .text | |
43 #define ALIGN(X) .align 2 | |
44 #define LABELDEF(X) .##X##: | |
45 #define LABELUSE(X) .##X | |
46 #define END_PROC | |
47 #define END_ASM | |
48 | |
49 #if defined(OS_Darwin) | |
50 #define GLOBAL_C(X) .globl _##X | |
51 #define ENTRY_C(X) _##X: | |
52 #else | |
53 #define GLOBAL_C(X) .globl X | |
54 #define ENTRY_C(X) X: | |
55 #endif | |
56 | |
57 #endif | |
58 |