summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1995-07-17 15:58:46 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1995-07-17 15:58:46 +0000
commitefa7a2fe70d4d9bd72c2737a9d7f86e65baf08d2 (patch)
treeeab127f293e1374ade4b0d888293c964dd6cb808
parent71631bdaa72607d72ac07caa855037d47b3cf4b9 (diff)
Initial revision
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@108 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--testasmcomp/mips.asm55
1 files changed, 55 insertions, 0 deletions
diff --git a/testasmcomp/mips.asm b/testasmcomp/mips.asm
new file mode 100644
index 000000000..395fc4526
--- /dev/null
+++ b/testasmcomp/mips.asm
@@ -0,0 +1,55 @@
+ .globl call_gen_code
+ .ent call_gen_code
+call_gen_code:
+ subu $sp, $sp, 88
+ sw $31, 84($sp)
+ /* Save all callee-save registers */
+ sw $16, 0($sp)
+ sw $17, 4($sp)
+ sw $18, 8($sp)
+ sw $19, 12($sp)
+ sw $20, 16($sp)
+ sw $21, 20($sp)
+ sw $22, 24($sp)
+ sw $23, 28($sp)
+ sw $30, 32($sp)
+ s.d $f20, 36($sp)
+ s.d $f22, 44($sp)
+ s.d $f24, 52($sp)
+ s.d $f26, 60($sp)
+ s.d $f28, 68($sp)
+ s.d $f30, 76($sp)
+ /* Shuffle arguments */
+ move $8, $5
+ move $9, $6
+ move $10, $7
+ jal $4
+ /* Restore registers */
+ lw $31, 84($sp)
+ lw $16, 0($sp)
+ lw $17, 4($sp)
+ lw $18, 8($sp)
+ lw $19, 12($sp)
+ lw $20, 16($sp)
+ lw $21, 20($sp)
+ lw $22, 24($sp)
+ lw $23, 28($sp)
+ lw $30, 32($sp)
+ l.d $f20, 36($sp)
+ l.d $f22, 44($sp)
+ l.d $f24, 52($sp)
+ l.d $f26, 60($sp)
+ l.d $f28, 68($sp)
+ l.d $f30, 76($sp)
+ addu $sp, $sp, 88
+ j $31
+
+ .end call_gen_code
+
+/* Call a C function */
+
+ .globl caml_c_call
+ .ent caml_c_call
+caml_c_call:
+ j $25
+ .end caml_c_call \ No newline at end of file