Mercurial > pub > dyncall > dyncall
annotate dyncallback/dyncall_args_mips.h @ 104:dbca6763f2be
- complete, working mips o32 callback (using hardware fp); fixes error from last commit, which ignored first 2 float args
* currently tested on little endian, only
* todo update, manual update, cleanups
author | cslag |
---|---|
date | Thu, 09 Jun 2016 15:13:53 +0200 |
parents | b7a9b524f0c3 |
children | 9e677d4c0b6b |
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 | |
9 Copyright (c) 2013-2015 Daniel Adler <dadler@uni-goettingen.de>, | |
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 { | |
102
b7a9b524f0c3
- mips o32 callbacks, first draft (calls into handler correctly, with correct params, but doesn't return)
cslag
parents:
0
diff
changeset
|
34 /* Don't change order! */ |
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
|
35 #if defined(DC__ABI_MIPS_O32) |
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
|
36 int freg_count; |
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
|
37 #else |
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
|
38 # define DCARGS_MIPS_PARAM_REGS 8 |
102
b7a9b524f0c3
- mips o32 callbacks, first draft (calls into handler correctly, with correct params, but doesn't return)
cslag
parents:
0
diff
changeset
|
39 struct { int i; float f; } reg_data[DCARGS_MIPS_PARAM_REGS]; |
b7a9b524f0c3
- mips o32 callbacks, first draft (calls into handler correctly, with correct params, but doesn't return)
cslag
parents:
0
diff
changeset
|
40 struct { int i; int f; } reg_count; |
b7a9b524f0c3
- mips o32 callbacks, first draft (calls into handler correctly, with correct params, but doesn't return)
cslag
parents:
0
diff
changeset
|
41 #endif |
b7a9b524f0c3
- mips o32 callbacks, first draft (calls into handler correctly, with correct params, but doesn't return)
cslag
parents:
0
diff
changeset
|
42 unsigned char* stackptr; |
0 | 43 }; |
44 | |
45 #endif /* DYNCALLBACK_ARGS_MIPS_H */ | |
46 |