annotate dyncall/dyncall_call_mips_n32.S @ 457:90b1d927912a

- suite_aggrs: make sure random memory used doesn't ever result in NaN fp values (for every possible address), as this messes with result comparison
author Tassilo Philipp
date Fri, 28 Jan 2022 14:11:21 +0100
parents d55f9d508074
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: dyncall
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
5 File: dyncall/dyncall_call_mips_n32.S
131
21537652361e - fixed mips64 n32 build (not sure if working, though)
cslag
parents: 124
diff changeset
6 Description: mips64 "n32" abi call kernel implementation in GNU Assembler
0
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
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
9 Copyright (c) 2007-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 .section .mdebug.abiN32
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 .previous
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 .abicalls
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 .text
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
30 .align 2
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
31 .globl dcCall_mips_n32
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
32 .ent dcCall_mips_n32
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 dcCall_mips_n32:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 /* Stack-frame prolog */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
37 .frame $fp,64,$31 /* vars=16, regs=3/0, args=0, extra=16 */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
38 .mask 0xd0000000,-8
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
39 .fmask 0x00000000,0
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
40 subu $sp,$sp,64
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
41 sd $31,48($sp) /* save return address register (ra) */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
42 sd $30,40($sp) /* save frame pointer register (fp) */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
43 sd $28,32($sp) /* save global pointer register (gp) */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
44 move $fp,$sp
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 /* arguments: */
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
48
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 /* $4 target function */
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
50 /* $5 register data */
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 /* $6 stack size */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 /* $7 stack data */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
54
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
55 /* allocate argument stack space */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
56
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
57 subu $sp, $sp, $6
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
58
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59 /* copy stack data */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
60
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
61 /* n32 abi call assumptions:
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
62 - stack data is 16-byte aligned.
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
63 - no extra-storage for arguments passed via registers.
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
64 */
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
65
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
66 /* $12 source pointer (parameter stack data) */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
67 /* $14 destination (stack pointer) */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
68 /* $6 byte count */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
69
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
70 move $12, $7
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
71 move $14, $sp
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
72
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
73 .next:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
74 beq $6, $0, .skip
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
75 nop
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
76 daddiu $6, $6, -8
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
77 ld $2, 0($12)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
78 sd $2, 0($14)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
79 daddiu $12,$12, 8
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
80 daddiu $14,$14, 8
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
81 b .next
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
82 .skip:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
83 move $25, $4
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
84
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
85 /* load registers */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
86
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
87 /* locals: */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
88 /* $13 = register data */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
89 /* $14 = useDouble flags */
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
90 move $13, $5
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
91 ld $14, 128($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
92
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
93 /* load integer parameter registers */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
94
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
95 ld $4 , 0($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
96 ld $5 , 8($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
97 ld $6 ,16($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
98 ld $7 ,24($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
99 ld $8 ,32($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
100 ld $9 ,40($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
101 ld $10,48($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
102 ld $11,56($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
103
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
104 /* load float-or-double floating pointer parameter registers
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
105 a 64-bit bitmask given at byte offset 128 of regdata indicates
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
106 if loading a float (bit cleared) or double (bit set), starting
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
107 at bit position 0 in bitmask.
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
108 */
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
109 .t0:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
110 and $15, $14, 1
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
111 bgtz $15, .d0
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
112 .f0:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
113 l.s $f12, 64($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
114 j .t1
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
115 .d0:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
116 l.d $f12, 64($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
117
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
118 .t1:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
119 and $15, $14, 2
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
120 bgtz $15, .d1
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
121 .f1:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
122 l.s $f13, 72($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
123 j .t2
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
124 .d1:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
125 l.d $f13, 72($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
126 .t2:
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
127 and $15, $14, 4
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
128 bgtz $15, .d2
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
129 .f2:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
130 l.s $f14, 80($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
131 j .t3
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
132 .d2:
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
133 l.d $f14, 80($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
134 .t3:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
135 and $15, $14, 8
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
136 bgtz $15, .d3
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
137 .f3:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
138 l.s $f15, 88($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
139 j .t4
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
140 .d3:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
141 l.d $f15, 88($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
142 .t4:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
143 and $15, $14, 16
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
144 bgtz $15, .d4
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
145 .f4:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
146 l.s $f16, 96($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
147 j .t5
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
148 .d4:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
149 l.d $f16, 96($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
150 .t5:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
151 and $15, $14, 32
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
152 bgtz $15, .d5
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
153 .f5:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
154 l.s $f17,104($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
155 j .t6
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
156 .d5:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
157 l.d $f17,104($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
158 .t6:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
159 and $15, $14, 64
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
160 bgtz $15, .d6
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
161 .f6:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
162 l.s $f18,112($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
163 j .t7
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
164 .d6:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
165 l.d $f18,112($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
166 .t7:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
167 and $15, $14, 128
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
168 bgtz $15, .d7
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
169 .f7:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
170 l.s $f19,120($13)
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
171 j .fregend
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
172 .d7:
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
173 l.d $f19,120($13)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
174
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
175 .fregend:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
176
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
177 /* jump-and-link to register $25 */
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
178
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
179 jal $31, $25
124
6bd0974d257b - big-endian mips fixes for return values
cslag
parents: 0
diff changeset
180 nop /* branch-delay slot - no nop according to gcc assembly */
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
181 /* output, but let's play safe */
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
182
302
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
183 /* Stack-frame epilog */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
184 move $sp,$fp
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
185 ld $31,48($sp) /* restore ra register */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
186 ld $fp,40($sp) /* restore fp register */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
187 ld $28,32($sp) /* restore gp register */
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
188 daddu $sp,$sp,64
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
189 j $31
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
190 .end dcCall_mips_n64
d55f9d508074 - mips softfloat support for o32 callconv (calls and callbacks, little and big endian)
Tassilo Philipp
parents: 131
diff changeset
191 .size dcCall_mips_n64, .-dcCall_mips_n64
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
192