Mercurial > pub > dyncall > dyncall
comparison dyncall/dyncall_call_mips_n64.h @ 0:3e629dc19168
initial from svn dyncall-1745
author | Daniel Adler |
---|---|
date | Thu, 19 Mar 2015 22:24:28 +0100 |
parents | |
children | 21537652361e |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e629dc19168 |
---|---|
1 /* | |
2 | |
3 Package: dyncall | |
4 Library: dyncall | |
5 File: dyncall/dyncall_call_mips_n64.h | |
6 Description: mips "n64" ABI call-kernel C interface. | |
7 License: | |
8 | |
9 Copyright (c) 2007-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 | |
28 #ifndef DYNCALL_CALL_MIPS_N64_H | |
29 #define DYNCALL_CALL_MIPS_N64_H | |
30 | |
31 #include "dyncall_types.h" | |
32 | |
33 #ifdef __cplusplus | |
34 extern "C" { | |
35 #endif | |
36 | |
37 /* | |
38 two register-files for integer (promoted to 64-bit) and float (not promoted!) | |
39 are used. | |
40 | |
41 arguments are transfered in a free slot on the corresponding register file. | |
42 the other register-file will be skipped by one. | |
43 | |
44 float arguments are either loaded from single or double - | |
45 a auto-conversion into double and then loaded as double precision | |
46 turned out to fail for several tests. | |
47 | |
48 therefore a union for storage of float or double is used instead. | |
49 a bitmask (mUseDouble) records which type is used and will be | |
50 interpreted in the call-kernel. | |
51 */ | |
52 | |
53 struct DCRegData_mips_n64 | |
54 { | |
55 DClonglong mIntData[8]; | |
56 union { DCfloat f; DCdouble d; } mFloatData[8]; | |
57 DClonglong mUseDouble; /* bitmask: lower 8 bits specifies to use float or double from union array. */ | |
58 }; | |
59 | |
60 void dcCall_mips_n64(DCpointer target, struct DCRegData_mips_n64* regdata, DCsize stksize, DCpointer stkdata); | |
61 | |
62 #ifdef __cplusplus | |
63 } | |
64 #endif | |
65 | |
66 | |
67 #endif /* DYNCALL_CALL_MIPS_N64_H */ | |
68 |