comparison dyncall/dyncall_call_mips_eabi_gas.s @ 110:9aa75a74614c

- working mips32 eabi callbacks - mips32 eabi doc update - switched some mips32 eabi call assembly to use more portable pseudo instructions for storing floats - fixed weird type use of var declaration in mips callbacks - ToDo update - converted some // comments to old c-style - test code build fix for some test suites on some platforms
author cslag
date Sat, 18 Jun 2016 19:38:22 +0200
parents 9e677d4c0b6b
children
comparison
equal deleted inserted replaced
109:9e677d4c0b6b 110:9aa75a74614c
35 .text 35 .text
36 .globl dcCall_mips_eabi 36 .globl dcCall_mips_eabi
37 37
38 dcCall_mips_eabi: 38 dcCall_mips_eabi:
39 /* $4 target function */ 39 /* $4 target function */
40 /* $5 register data */ 40 /* $5 register data */
41 /* $6 stack size */ 41 /* $6 stack size */
42 /* $7 stack data */ 42 /* $7 stack data */
43 addiu $sp,$sp,-16 43 addiu $sp,$sp,-16
44 sw $16,8($sp) 44 sw $16,8($sp)
45 sw $31,4($sp) 45 sw $31,4($sp)
46 sw $fp,0($sp) 46 sw $fp,0($sp)
47 47
48 move $fp,$sp 48 move $fp,$sp
49 49
50 move $2, $0 50 move $2, $0
51 add $2, 8 51 add $2, 8
52 neg $2 52 neg $2
53 and $sp, $2 53 and $sp, $2
54 add $6, 7 54 add $6, 7
55 and $6, $2 55 and $6, $2
56 56
57 move $12,$4 /* target function */ 57 move $12,$4 /* target function */
58 move $13,$5 /* register data */ 58 move $13,$5 /* register data */
59 move $16,$6 /* stack size */ 59 move $16,$6 /* stack size */
60 60
61 sub $sp,$sp,$16 /* allocate stack frame */ 61 sub $sp,$sp,$16 /* allocate stack frame */
62 62
63 /* copy stack data */ 63 /* copy stack data */
64 64
65 .next: 65 .next:
66 beq $6,$0, .skip 66 beq $6,$0, .skip
67 nop 67 nop
71 sw $2, 0($sp) 71 sw $2, 0($sp)
72 addiu $7,$7, 4 72 addiu $7,$7, 4
73 addiu $sp,$sp, 4 73 addiu $sp,$sp, 4
74 j .next 74 j .next
75 nop 75 nop
76 76
77 .skip: 77 .skip:
78 78
79 sub $sp,$sp,$16 79 sub $sp,$sp,$16
80 80
81 /* load integer parameter registers */ 81 /* load integer parameter registers */
82 82
89 lw $10,24($13) 89 lw $10,24($13)
90 lw $11,28($13) 90 lw $11,28($13)
91 91
92 /* load single-precision floating pointer parameter registers */ 92 /* load single-precision floating pointer parameter registers */
93 93
94 lwc1 $f12, 32($13) 94 l.s $f12, 32($13)
95 lwc1 $f13, 36($13) 95 l.s $f13, 36($13)
96 lwc1 $f14, 40($13) 96 l.s $f14, 40($13)
97 lwc1 $f15, 44($13) 97 l.s $f15, 44($13)
98 lwc1 $f16, 48($13) 98 l.s $f16, 48($13)
99 lwc1 $f17, 52($13) 99 l.s $f17, 52($13)
100 lwc1 $f18, 56($13) 100 l.s $f18, 56($13)
101 lwc1 $f19, 60($13) 101 l.s $f19, 60($13)
102 102
103 jal $12 103 jal $12
104 nop 104 nop
105 105
106 /* add $sp,$sp,$16 */ 106 /* add $sp,$sp,$16 */