Mercurial > pub > dyncall > dyncall
annotate dyncallback/dyncall_args_mips.h @ 613:3c3e321875f7
- adding helper target to cmake
author | Tassilo Philipp |
---|---|
date | Sat, 01 Oct 2022 16:03:25 +0200 |
parents | b104c5beec8b |
children |
rev | line source |
---|---|
0 | 1 /* |
2 | |
3 Package: dyncall | |
4 Library: dyncallback | |
5 File: dyncallback/dyncall_args_mips.h | |
6 Description: Callback's Arguments VM - Header for MIPS | |
7 License: | |
8 | |
281 | 9 Copyright (c) 2013-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 #ifndef DYNCALLBACK_ARGS_MIPS_H | |
28 #define DYNCALLBACK_ARGS_MIPS_H | |
29 | |
30 #include "dyncall_args.h" | |
31 | |
32 struct DCArgs | |
33 { | |
122
f63467916f98
- first draft of mips64 n64 callbacks, not everything working, though
cslag
parents:
110
diff
changeset
|
34 /* Don't change order or types, laid out for asm code to fill in! */ |
f63467916f98
- first draft of mips64 n64 callbacks, not everything working, though
cslag
parents:
110
diff
changeset
|
35 #if defined(DC__Arch_MIPS) && defined(DC__ABI_MIPS_O32) |
305 | 36 |
302
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
37 DCint freg_count; /* unused on soft-float targets, but keep as 4b-padding */ |
305 | 38 |
104
dbca6763f2be
- complete, working mips o32 callback (using hardware fp); fixes error from last commit, which ignored first 2 float args
cslag
parents:
102
diff
changeset
|
39 #else |
305 | 40 |
41 # if defined(DC__Arch_MIPS) | |
42 | |
109 | 43 # define DCARGS_MIPS_NUM_IREGS 8 |
44 # define DCARGS_MIPS_NUM_FREGS 8 | |
45 DCint ireg_data[DCARGS_MIPS_NUM_IREGS]; | |
46 DCfloat freg_data[DCARGS_MIPS_NUM_FREGS]; | |
47 struct { DCshort i; DCshort f; } reg_count; | |
305 | 48 |
49 # elif defined(DC__Arch_MIPS64) | |
50 | |
51 /* single counter for both, int & float: mips64 uses 8 max, total, either */ | |
52 /* skipping over other/type's reg, or only using int regs on soft-float */ | |
53 # define DCARGS_MIPS_NUM_REGS 8 | |
54 # if defined(DC__ABI_SOFTFLOAT) | |
55 union | |
56 # else | |
57 struct | |
58 # endif | |
59 { | |
60 DClonglong ireg_data[DCARGS_MIPS_NUM_REGS]; | |
61 DCdouble freg_data[DCARGS_MIPS_NUM_REGS]; | |
62 }; | |
122
f63467916f98
- first draft of mips64 n64 callbacks, not everything working, though
cslag
parents:
110
diff
changeset
|
63 DClonglong reg_count; |
305 | 64 |
65 # endif | |
66 | |
102
b7a9b524f0c3
- mips o32 callbacks, first draft (calls into handler correctly, with correct params, but doesn't return)
cslag
parents:
0
diff
changeset
|
67 #endif |
110 | 68 DCuchar* stackptr; |
0 | 69 }; |
70 | |
71 #endif /* DYNCALLBACK_ARGS_MIPS_H */ | |
72 |