1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Objective Caml */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Copyright 1996 Institut National de Recherche en Informatique et */
|
1999-11-17 10:59:06 -08:00
|
|
|
/* en Automatique. All rights reserved. This file is distributed */
|
|
|
|
/* under the terms of the Q Public License version 1.0. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
1995-07-17 08:58:46 -07:00
|
|
|
.globl call_gen_code
|
|
|
|
.ent call_gen_code
|
|
|
|
call_gen_code:
|
1999-11-29 11:04:56 -08:00
|
|
|
subu $sp, $sp, 0x90
|
1998-11-18 10:10:53 -08:00
|
|
|
sd $31, 0x88($sp)
|
1995-07-17 08:58:46 -07:00
|
|
|
/* Save all callee-save registers */
|
1998-11-18 10:10:53 -08:00
|
|
|
sd $16, 0x0($sp)
|
|
|
|
sd $17, 0x8($sp)
|
|
|
|
sd $18, 0x10($sp)
|
|
|
|
sd $19, 0x18($sp)
|
|
|
|
sd $20, 0x20($sp)
|
|
|
|
sd $21, 0x28($sp)
|
|
|
|
sd $22, 0x30($sp)
|
|
|
|
sd $23, 0x38($sp)
|
|
|
|
sd $30, 0x40($sp)
|
|
|
|
s.d $f20, 0x48($sp)
|
|
|
|
s.d $f22, 0x50($sp)
|
|
|
|
s.d $f24, 0x58($sp)
|
|
|
|
s.d $f26, 0x60($sp)
|
|
|
|
s.d $f28, 0x68($sp)
|
|
|
|
s.d $f30, 0x70($sp)
|
1995-07-17 08:58:46 -07:00
|
|
|
/* Shuffle arguments */
|
|
|
|
move $8, $5
|
|
|
|
move $9, $6
|
|
|
|
move $10, $7
|
1997-02-02 06:54:46 -08:00
|
|
|
move $25, $4
|
1995-07-17 08:58:46 -07:00
|
|
|
jal $4
|
|
|
|
/* Restore registers */
|
1998-11-18 10:10:53 -08:00
|
|
|
ld $31, 0x88($sp)
|
|
|
|
ld $16, 0x0($sp)
|
|
|
|
ld $17, 0x8($sp)
|
|
|
|
ld $18, 0x10($sp)
|
|
|
|
ld $19, 0x18($sp)
|
|
|
|
ld $20, 0x20($sp)
|
|
|
|
ld $21, 0x28($sp)
|
|
|
|
ld $22, 0x30($sp)
|
|
|
|
ld $23, 0x38($sp)
|
|
|
|
ld $30, 0x40($sp)
|
|
|
|
l.d $f20, 0x48($sp)
|
|
|
|
l.d $f22, 0x50($sp)
|
|
|
|
l.d $f24, 0x58($sp)
|
|
|
|
l.d $f26, 0x60($sp)
|
|
|
|
l.d $f28, 0x68($sp)
|
|
|
|
l.d $f30, 0x70($sp)
|
|
|
|
addu $sp, $sp, 0x90
|
1995-07-17 08:58:46 -07:00
|
|
|
j $31
|
|
|
|
|
|
|
|
.end call_gen_code
|
|
|
|
|
|
|
|
/* Call a C function */
|
|
|
|
|
|
|
|
.globl caml_c_call
|
|
|
|
.ent caml_c_call
|
|
|
|
caml_c_call:
|
1997-02-02 06:54:46 -08:00
|
|
|
move $25, $24
|
1997-02-01 09:40:41 -08:00
|
|
|
j $24
|
1998-11-18 10:10:53 -08:00
|
|
|
.end caml_c_call
|