Mercurial > pub > dyncall > dyncall
comparison dyncall/dyncall_value.h @ 126:be08b699dca5
- mips64 n64 float fixes (big endian), now mips64 n64 is fully supported (for at least big-endian platforms, still need to test little endian)
author | cslag |
---|---|
date | Tue, 05 Jul 2016 14:20:57 +0200 |
parents | 6bd0974d257b |
children | 59d758760688 |
comparison
equal
deleted
inserted
replaced
125:f1fc1c836baf | 126:be08b699dca5 |
---|---|
46 | 46 |
47 typedef union DCValue_ DCValue; | 47 typedef union DCValue_ DCValue; |
48 | 48 |
49 union DCValue_ | 49 union DCValue_ |
50 { | 50 { |
51 /* dyncallback assembly pulls value directly from DCValue structs, without */ | |
52 /* knowledge about types used, so lay it out as needed at compile time, here */ | |
51 #if (defined(DC__Arch_PPC32) || defined(DC__Arch_MIPS)) && defined(DC__Endian_BIG) | 53 #if (defined(DC__Arch_PPC32) || defined(DC__Arch_MIPS)) && defined(DC__Endian_BIG) |
52 DCbool B; | 54 DCbool B; |
53 struct { DCchar c_pad[3]; DCchar c; }; | 55 struct { DCchar c_pad[3]; DCchar c; }; |
54 struct { DCuchar C_pad[3]; DCuchar C; }; | 56 struct { DCuchar C_pad[3]; DCuchar C; }; |
55 struct { DCshort s_pad; DCshort s; }; | 57 struct { DCshort s_pad; DCshort s; }; |
56 struct { DCshort S_pad; DCshort S; }; | 58 struct { DCshort S_pad; DCshort S; }; |
57 DCint i; | 59 DCint i; |
58 DCuint I; | 60 DCuint I; |
59 #elif (defined(DC__Arch_PPC64) || defined(DC__Arch_MIPS64)) && defined(DC__Endian_BIG) | 61 #elif (defined(DC__Arch_PPC64) || defined(DC__Arch_MIPS64)) && defined(DC__Endian_BIG) |
60 struct { DCbool B_pad; DCbool B; }; | 62 struct { DCbool B_pad; DCbool B; }; |
61 struct { DCchar c_pad[7]; DCchar c; }; | 63 struct { DCchar c_pad[7]; DCchar c; }; |
62 struct { DCuchar C_pad[7]; DCuchar C; }; | 64 struct { DCuchar C_pad[7]; DCuchar C; }; |
63 struct { DCshort s_pad[3]; DCshort s; }; | 65 struct { DCshort s_pad[3]; DCshort s; }; |
64 struct { DCshort S_pad[3]; DCshort S; }; | 66 struct { DCshort S_pad[3]; DCshort S; }; |
65 struct { DCint i_pad; DCint i; }; | 67 struct { DCint i_pad; DCint i; }; |
66 struct { DCint I_pad; DCuint I; }; | 68 struct { DCint I_pad; DCuint I; }; |
67 #else | 69 #else |
68 DCbool B; | 70 DCbool B; |
69 DCchar c; | 71 DCchar c; |
70 DCuchar C; | 72 DCuchar C; |
71 DCshort s; | 73 DCshort s; |
72 DCushort S; | 74 DCushort S; |
73 DCint i; | 75 DCint i; |
74 DCuint I; | 76 DCuint I; |
75 #endif | 77 #endif |
76 DClong j; | 78 DClong j; |
77 DCulong J; | 79 DCulong J; |
78 DClonglong l; | 80 DClonglong l; |
79 DCulonglong L; | 81 DCulonglong L; |
80 DCfloat f; | 82 #if defined(DC__Arch_MIPS64) && defined(DC__Endian_BIG) |
81 DCdouble d; | 83 struct { DCfloat f_pad; DCfloat f; }; |
82 DCpointer p; | 84 #else |
83 DCstring Z; | 85 DCfloat f; |
86 #endif | |
87 DCdouble d; | |
88 DCpointer p; | |
89 DCstring Z; | |
84 }; | 90 }; |
85 | 91 |
86 #ifdef __cplusplus | 92 #ifdef __cplusplus |
87 } | 93 } |
88 #endif | 94 #endif |