Mercurial > pub > dyncall > dyncall
annotate dyncall/dyncall_call.S @ 535:d717a5561335
- typo
author | Tassilo Philipp |
---|---|
date | Sat, 23 Apr 2022 15:05:03 +0200 |
parents | d55f9d508074 |
children | 0c8838766866 |
rev | line source |
---|---|
0 | 1 /* |
2 | |
3 Package: dyncall | |
4 Library: dyncall | |
5 File: dyncall/dyncall_call.S | |
6 Description: assembly call kernel, auto-selected by gcc / Plan9 build system | |
7 License: | |
8 | |
281 | 9 Copyright (c) 2007-2018 Daniel Adler <dadler@uni-goettingen.de>, |
0 | 10 Tassilo Philipp <tphilipp@potion-studios.com> |
11 | |
12 Permission to use, copy, modify, and distribute this software for any | |
13 purpose with or without fee is hereby granted, provided that the above | |
14 copyright notice and this permission notice appear in all copies. | |
15 | |
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
23 | |
24 */ | |
25 | |
26 | |
27 #include "dyncall_macros.h" | |
28 | |
29 /* Plan9 */ | |
30 #if defined(DC__OS_Plan9) | |
31 # if defined(DC__Arch_Intel_x86) | |
32 # include "dyncall_call_x86_8a.s" | |
33 # else | |
34 # error Unsupported Architecture on Plan9. | |
35 # endif | |
36 #elif defined(DC__C_MSVC) | |
37 # if defined(DC__OS_Win32) | |
38 # include "dyncall_call_x86_generic_masm.asm" | |
39 # elif defined(DC__OS_Win64) | |
40 # include "dyncall_call_x64_generic_masm.asm" | |
41 # endif | |
42 #else | |
43 # if defined(DC__Arch_Intel_x86) | |
44 # include "dyncall_call_x86.S" | |
45 # elif defined(DC__Arch_AMD64) | |
165
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
0
diff
changeset
|
46 # include "dyncall_call_x64.S" |
0 | 47 # elif defined(DC__Arch_ARM_ARM) |
48 # if defined(DC__ABI_ARM_HF) | |
49 # include "dyncall_call_arm32_arm_armhf.S" | |
50 # else | |
51 # include "dyncall_call_arm32_arm.S" | |
52 # endif | |
53 # elif defined(DC__Arch_ARM_THUMB) | |
54 # if defined(DC__OS_Darwin) | |
55 # include "dyncall_call_arm32_thumb_apple.s" | |
56 # else | |
57 # if defined(DC__ABI_ARM_HF) | |
58 # include "dyncall_call_arm32_thumb_armhf.S" | |
59 # else | |
60 # include "dyncall_call_arm32_thumb_gas.s" | |
61 # endif | |
62 # endif | |
63 # elif defined(DC__Arch_ARM64) | |
64 # include "dyncall_call_arm64.S" | |
65 # elif defined(DC__Arch_PPC32) | |
66 # include "dyncall_call_ppc32.S" | |
67 # elif defined(DC__Arch_PPC64) | |
68 # include "dyncall_call_ppc64.S" | |
69 # elif defined(DC__Arch_MIPS) || defined(DC__Arch_MIPS64) | |
302
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
70 # if defined(DC__ABI_MIPS_O32) |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
71 # include "dyncall_call_mips_o32.S" |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
72 # elif defined(DC__ABI_MIPS_N64) |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
73 # include "dyncall_call_mips_n64.S" |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
74 # elif defined(DC__ABI_MIPS_N32) |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
75 # include "dyncall_call_mips_n32.S" |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
76 # else |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
77 # include "dyncall_call_mips_eabi_gas.s" |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
78 # endif |
179 | 79 # elif defined(DC__Arch_Sparc64) |
192
cf8134a20759
- b/c no preproc needed, changed some files from .S -> .s
Tassilo Philipp
parents:
179
diff
changeset
|
80 # include "dyncall_call_sparc64.s" |
0 | 81 # elif defined(DC__Arch_Sparc) |
192
cf8134a20759
- b/c no preproc needed, changed some files from .S -> .s
Tassilo Philipp
parents:
179
diff
changeset
|
82 # include "dyncall_call_sparc.s" |
0 | 83 # else |
84 # error Unsupported Architecture. | |
85 # endif | |
86 #endif | |
87 | |
268
03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
Tassilo Philipp
parents:
192
diff
changeset
|
88 |
03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
Tassilo Philipp
parents:
192
diff
changeset
|
89 /* Use .note.GNU-stack to explicitly indicate a non-exec stack, b/c of bad */ |
03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
Tassilo Philipp
parents:
192
diff
changeset
|
90 /* default behaviour when translating handwritten assembly files (needed on */ |
269 | 91 /* GNU platforms, Android and FreeBSD, as tests have shown). */ |
268
03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
Tassilo Philipp
parents:
192
diff
changeset
|
92 #if (defined(DC__C_CLANG) || defined(DC__C_GNU)) && defined(__ELF__) && (defined(DC__OS_Linux) || defined(DC__OS_FreeBSD)) |
03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
Tassilo Philipp
parents:
192
diff
changeset
|
93 .section .note.GNU-stack,"",%progbits |
03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
Tassilo Philipp
parents:
192
diff
changeset
|
94 #endif |
03f0b683918a
- reintroduced .note.GNU-stack section, as mentioned in prev commit
Tassilo Philipp
parents:
192
diff
changeset
|
95 |