Mercurial > pub > dyncall > dyncall
annotate dyncall/dyncall_call_mips_o32.h @ 302:d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
- cleanup of some mips files, removed unnecessary file, renamings..
- doc/manual cleanups, changelog entry
author | Tassilo Philipp |
---|---|
date | Mon, 21 May 2018 02:48:12 +0200 |
parents | f5577f6bf97a |
children |
rev | line source |
---|---|
0 | 1 /* |
2 | |
3 Package: dyncall | |
4 Library: dyncall | |
5 File: dyncall/dyncall_call_mips_o32.h | |
6 Description: mips "o32" abi call kernel C interface. | |
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 | |
28 #ifndef DYNCALL_CALL_MIPS_O32_H | |
29 #define DYNCALL_CALL_MIPS_O32_H | |
30 | |
31 #include "dyncall_types.h" | |
32 | |
33 #ifdef __cplusplus | |
34 extern "C" { | |
35 #endif | |
36 | |
37 /* Call-kernel register data: | |
38 | |
39 Details: | |
302
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
40 |
0 | 41 The structure holds the argument data for transfering float/double arguments |
42 via registers as well. | |
302
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
43 The call-kernel on hardfloat platforms implements loads two doubles, which |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
44 involves four 32-bit floating pointer registers. It's unused for softfloat |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
45 platforms. |
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
46 |
0 | 47 Float arguments map as following: |
48 | |
101 | 49 float argument 0 is at u[0][0] for little, u[0][1] for big endian and |
50 float argument 1 is at u[1][0] for little, u[1][1] for big endian of | |
51 DCRegData_mips_o32 union. | |
0 | 52 |
53 */ | |
54 | |
302
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
55 typedef struct |
0 | 56 { |
302
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
57 #if defined(DC__ABI_HARDFLOAT) |
0 | 58 union { |
59 double d; | |
60 float f[2]; | |
61 } u[2]; | |
302
d55f9d508074
- mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents:
281
diff
changeset
|
62 #endif /* DC__ABI_HARDFLOAT */ |
0 | 63 } DCRegData_mips_o32; |
64 | |
65 | |
66 /* Call kernel. */ | |
67 | |
68 void dcCall_mips_o32(DCpointer target, DCRegData_mips_o32* regdata, DCsize stksize, DCpointer stkdata); | |
69 | |
70 | |
71 #ifdef __cplusplus | |
72 } | |
73 #endif | |
74 | |
75 | |
76 #endif /* DYNCALL_CALL_MIPS_O32_H */ | |
77 |