annotate dyncallback/dyncall_args_mips.h @ 357:d982a00c2177

- PPC64 asm syntax fix, specifying explicitly comparison mode for cmpi (newer toolchains complain, older ones took optional field of instruction which happened to be same value)
author Tassilo Philipp
date Tue, 25 Feb 2020 18:16:13 +0100
parents b104c5beec8b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 /*
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 Package: dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 Library: dyncallback
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 File: dyncallback/dyncall_args_mips.h
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 Description: Callback's Arguments VM - Header for MIPS
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 License:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8
281
f5577f6bf97a - file header cleanups for release
Tassilo Philipp
parents: 122
diff changeset
9 Copyright (c) 2013-2018 Daniel Adler <dadler@uni-goettingen.de>,
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 Tassilo Philipp <tphilipp@potion-studios.com>
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 Permission to use, copy, modify, and distribute this software for any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 purpose with or without fee is hereby granted, provided that the above
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 copyright notice and this permission notice appear in all copies.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 #ifndef DYNCALLBACK_ARGS_MIPS_H
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 #define DYNCALLBACK_ARGS_MIPS_H
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 #include "dyncall_args.h"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 struct DCArgs
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
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
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
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
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
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
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
40
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
41 # if defined(DC__Arch_MIPS)
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
42
109
9e677d4c0b6b - mips comment cleanups
cslag
parents: 104
diff changeset
43 # define DCARGS_MIPS_NUM_IREGS 8
9e677d4c0b6b - mips comment cleanups
cslag
parents: 104
diff changeset
44 # define DCARGS_MIPS_NUM_FREGS 8
9e677d4c0b6b - mips comment cleanups
cslag
parents: 104
diff changeset
45 DCint ireg_data[DCARGS_MIPS_NUM_IREGS];
9e677d4c0b6b - mips comment cleanups
cslag
parents: 104
diff changeset
46 DCfloat freg_data[DCARGS_MIPS_NUM_FREGS];
9e677d4c0b6b - mips comment cleanups
cslag
parents: 104
diff changeset
47 struct { DCshort i; DCshort f; } reg_count;
305
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
48
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
49 # elif defined(DC__Arch_MIPS64)
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
50
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
51 /* single counter for both, int & float: mips64 uses 8 max, total, either */
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
52 /* skipping over other/type's reg, or only using int regs on soft-float */
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
53 # define DCARGS_MIPS_NUM_REGS 8
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
54 # if defined(DC__ABI_SOFTFLOAT)
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
55 union
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
56 # else
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
57 struct
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
58 # endif
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
59 {
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
60 DClonglong ireg_data[DCARGS_MIPS_NUM_REGS];
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
61 DCdouble freg_data[DCARGS_MIPS_NUM_REGS];
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
62 };
122
f63467916f98 - first draft of mips64 n64 callbacks, not everything working, though
cslag
parents: 110
diff changeset
63 DClonglong reg_count;
305
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
64
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
65 # endif
b104c5beec8b - softfloat support for mips64/n64 abi
Tassilo Philipp
parents: 302
diff changeset
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
9aa75a74614c - working mips32 eabi callbacks
cslag
parents: 109
diff changeset
68 DCuchar* stackptr;
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
69 };
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
70
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
71 #endif /* DYNCALLBACK_ARGS_MIPS_H */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
72