1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
2011-07-27 07:17:02 -07:00
|
|
|
/* OCaml */
|
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 */
|
2001-12-07 05:41:02 -08:00
|
|
|
/* under the terms of the GNU Library General Public License, with */
|
|
|
|
/* the special exception on linking described in file ../LICENSE. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Asm part of the runtime system for the Sparc processor. */
|
1995-08-08 05:17:31 -07:00
|
|
|
/* Must be preprocessed by cpp */
|
1995-07-28 04:42:43 -07:00
|
|
|
|
2002-11-29 07:03:08 -08:00
|
|
|
#ifndef SYS_solaris
|
|
|
|
#define INDIRECT_LIMIT
|
|
|
|
#endif
|
|
|
|
|
1997-07-18 08:16:19 -07:00
|
|
|
#define Exn_ptr %l5
|
|
|
|
#define Alloc_ptr %l6
|
|
|
|
#define Alloc_limit %l7
|
1995-07-28 04:42:43 -07:00
|
|
|
|
|
|
|
#define Load(symb,reg) sethi %hi(symb), %g1; ld [%g1 + %lo(symb)], reg
|
|
|
|
#define Store(reg,symb) sethi %hi(symb), %g1; st reg, [%g1 + %lo(symb)]
|
1995-12-21 05:19:42 -08:00
|
|
|
#define Address(symb,reg) sethi %hi(symb), reg; or reg, %lo(symb), reg
|
1995-07-28 04:42:43 -07:00
|
|
|
|
|
|
|
/* Allocation functions */
|
|
|
|
|
|
|
|
.text
|
2012-02-17 02:12:09 -08:00
|
|
|
|
|
|
|
.global caml_system__code_begin
|
|
|
|
caml_system__code_begin:
|
|
|
|
|
|
|
|
.global caml_allocN
|
|
|
|
.global caml_call_gc
|
1995-07-28 04:42:43 -07:00
|
|
|
|
1997-07-18 08:16:19 -07:00
|
|
|
/* Required size in %g2 */
|
2012-02-17 02:12:09 -08:00
|
|
|
caml_allocN:
|
2002-11-29 07:03:08 -08:00
|
|
|
#ifdef INDIRECT_LIMIT
|
1997-07-18 06:35:00 -07:00
|
|
|
ld [Alloc_limit], %g1
|
1997-07-18 08:16:19 -07:00
|
|
|
sub Alloc_ptr, %g2, Alloc_ptr
|
1997-07-18 06:35:00 -07:00
|
|
|
cmp Alloc_ptr, %g1
|
2002-11-29 07:03:08 -08:00
|
|
|
#else
|
|
|
|
sub Alloc_ptr, %g2, Alloc_ptr
|
|
|
|
cmp Alloc_ptr, Alloc_limit
|
|
|
|
#endif
|
2012-02-17 02:12:09 -08:00
|
|
|
/*blu,pt %icc, caml_call_gc*/
|
|
|
|
blu caml_call_gc
|
1995-07-28 04:42:43 -07:00
|
|
|
nop
|
|
|
|
retl
|
|
|
|
nop
|
|
|
|
|
1997-07-18 08:16:19 -07:00
|
|
|
/* Required size in %g2 */
|
2012-02-17 02:12:09 -08:00
|
|
|
caml_call_gc:
|
1997-07-18 08:39:40 -07:00
|
|
|
/* Save exception pointer if GC raises */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(Exn_ptr, caml_exception_pointer)
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Save current allocation pointer for debugging purposes */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(Alloc_ptr, caml_young_ptr)
|
1997-11-27 08:28:40 -08:00
|
|
|
/* Record lowest stack address */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(%sp, caml_bottom_of_stack)
|
1997-11-27 08:28:40 -08:00
|
|
|
/* Record last return address */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(%o7, caml_last_return_address)
|
1997-11-25 04:51:38 -08:00
|
|
|
/* Allocate space on stack for caml_context structure and float regs */
|
1997-11-27 08:28:40 -08:00
|
|
|
sub %sp, 20*4 + 15*8, %sp
|
|
|
|
/* Save int regs on stack and save it into caml_gc_regs */
|
2004-08-12 09:04:07 -07:00
|
|
|
L100: add %sp, 96 + 15*8, %g1
|
|
|
|
st %o0, [%g1]
|
|
|
|
st %o1, [%g1 + 0x4]
|
|
|
|
st %o2, [%g1 + 0x8]
|
|
|
|
st %o3, [%g1 + 0xc]
|
|
|
|
st %o4, [%g1 + 0x10]
|
|
|
|
st %o5, [%g1 + 0x14]
|
|
|
|
st %i0, [%g1 + 0x18]
|
|
|
|
st %i1, [%g1 + 0x1c]
|
|
|
|
st %i2, [%g1 + 0x20]
|
|
|
|
st %i3, [%g1 + 0x24]
|
|
|
|
st %i4, [%g1 + 0x28]
|
|
|
|
st %i5, [%g1 + 0x2c]
|
|
|
|
st %l0, [%g1 + 0x30]
|
|
|
|
st %l1, [%g1 + 0x34]
|
|
|
|
st %l2, [%g1 + 0x38]
|
|
|
|
st %l3, [%g1 + 0x3c]
|
|
|
|
st %l4, [%g1 + 0x40]
|
|
|
|
st %g3, [%g1 + 0x44]
|
|
|
|
st %g4, [%g1 + 0x48]
|
|
|
|
st %g2, [%g1 + 0x4C] /* Save required size */
|
|
|
|
mov %g1, %g2
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(%g2, caml_gc_regs)
|
1997-11-25 04:51:38 -08:00
|
|
|
/* Save the floating-point registers */
|
|
|
|
add %sp, 96, %g1
|
1995-07-28 04:42:43 -07:00
|
|
|
std %f0, [%g1]
|
|
|
|
std %f2, [%g1 + 0x8]
|
|
|
|
std %f4, [%g1 + 0x10]
|
|
|
|
std %f6, [%g1 + 0x18]
|
|
|
|
std %f8, [%g1 + 0x20]
|
|
|
|
std %f10, [%g1 + 0x28]
|
|
|
|
std %f12, [%g1 + 0x30]
|
|
|
|
std %f14, [%g1 + 0x38]
|
|
|
|
std %f16, [%g1 + 0x40]
|
|
|
|
std %f18, [%g1 + 0x48]
|
|
|
|
std %f20, [%g1 + 0x50]
|
|
|
|
std %f22, [%g1 + 0x58]
|
|
|
|
std %f24, [%g1 + 0x60]
|
|
|
|
std %f26, [%g1 + 0x68]
|
|
|
|
std %f28, [%g1 + 0x70]
|
|
|
|
/* Call the garbage collector */
|
2012-02-17 02:12:09 -08:00
|
|
|
call caml_garbage_collection
|
1995-07-28 04:42:43 -07:00
|
|
|
nop
|
1997-11-27 08:28:40 -08:00
|
|
|
/* Restore all regs used by the code generator */
|
2004-08-12 09:04:07 -07:00
|
|
|
add %sp, 96 + 15*8, %g1
|
|
|
|
ld [%g1], %o0
|
|
|
|
ld [%g1 + 0x4], %o1
|
|
|
|
ld [%g1 + 0x8], %o2
|
|
|
|
ld [%g1 + 0xc], %o3
|
|
|
|
ld [%g1 + 0x10], %o4
|
|
|
|
ld [%g1 + 0x14], %o5
|
|
|
|
ld [%g1 + 0x18], %i0
|
|
|
|
ld [%g1 + 0x1c], %i1
|
|
|
|
ld [%g1 + 0x20], %i2
|
|
|
|
ld [%g1 + 0x24], %i3
|
|
|
|
ld [%g1 + 0x28], %i4
|
|
|
|
ld [%g1 + 0x2c], %i5
|
|
|
|
ld [%g1 + 0x30], %l0
|
|
|
|
ld [%g1 + 0x34], %l1
|
|
|
|
ld [%g1 + 0x38], %l2
|
|
|
|
ld [%g1 + 0x3c], %l3
|
|
|
|
ld [%g1 + 0x40], %l4
|
|
|
|
ld [%g1 + 0x44], %g3
|
|
|
|
ld [%g1 + 0x48], %g4
|
|
|
|
ld [%g1 + 0x4C], %g2 /* Recover desired size */
|
1997-11-25 04:51:38 -08:00
|
|
|
add %sp, 96, %g1
|
1995-07-28 04:42:43 -07:00
|
|
|
ldd [%g1], %f0
|
|
|
|
ldd [%g1 + 0x8], %f2
|
|
|
|
ldd [%g1 + 0x10], %f4
|
|
|
|
ldd [%g1 + 0x18], %f6
|
|
|
|
ldd [%g1 + 0x20], %f8
|
|
|
|
ldd [%g1 + 0x28], %f10
|
|
|
|
ldd [%g1 + 0x30], %f12
|
|
|
|
ldd [%g1 + 0x38], %f14
|
|
|
|
ldd [%g1 + 0x40], %f16
|
|
|
|
ldd [%g1 + 0x48], %f18
|
|
|
|
ldd [%g1 + 0x50], %f20
|
|
|
|
ldd [%g1 + 0x58], %f22
|
|
|
|
ldd [%g1 + 0x60], %f24
|
|
|
|
ldd [%g1 + 0x68], %f26
|
|
|
|
ldd [%g1 + 0x70], %f28
|
1997-07-18 08:16:19 -07:00
|
|
|
/* Reload alloc ptr */
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_young_ptr, Alloc_ptr)
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Allocate space for block */
|
2002-11-29 07:03:08 -08:00
|
|
|
#ifdef INDIRECT_LIMIT
|
2000-01-07 05:27:52 -08:00
|
|
|
ld [Alloc_limit], %g1
|
1997-07-18 08:16:19 -07:00
|
|
|
sub Alloc_ptr, %g2, Alloc_ptr
|
2000-01-07 05:27:52 -08:00
|
|
|
cmp Alloc_ptr, %g1 /* Check that we have enough free space */
|
2002-11-29 07:03:08 -08:00
|
|
|
#else
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_young_limit,Alloc_limit)
|
2002-11-29 07:03:08 -08:00
|
|
|
sub Alloc_ptr, %g2, Alloc_ptr
|
|
|
|
cmp Alloc_ptr, Alloc_limit
|
|
|
|
#endif
|
2000-01-07 05:27:52 -08:00
|
|
|
blu L100 /* If not, call GC again */
|
|
|
|
nop
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Return to caller */
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_last_return_address, %o7)
|
1995-07-28 04:42:43 -07:00
|
|
|
retl
|
1997-11-27 09:01:18 -08:00
|
|
|
add %sp, 20*4 + 15*8, %sp /* in delay slot */
|
1995-07-28 04:42:43 -07:00
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
/* Call a C function from Ocaml */
|
1995-07-28 04:42:43 -07:00
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_c_call
|
1997-07-18 08:16:19 -07:00
|
|
|
/* Function to call is in %g2 */
|
2012-02-17 02:12:09 -08:00
|
|
|
caml_c_call:
|
1997-11-27 08:28:40 -08:00
|
|
|
/* Record lowest stack address and return address */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(%sp, caml_bottom_of_stack)
|
|
|
|
Store(%o7, caml_last_return_address)
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Save the exception handler and alloc pointer */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(Exn_ptr, caml_exception_pointer)
|
|
|
|
sethi %hi(caml_young_ptr), %g1
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Call the C function */
|
1997-07-18 08:16:19 -07:00
|
|
|
call %g2
|
2012-02-17 02:12:09 -08:00
|
|
|
st Alloc_ptr, [%g1 + %lo(caml_young_ptr)] /* in delay slot */
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Reload return address */
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_last_return_address, %o7)
|
1997-07-18 08:16:19 -07:00
|
|
|
/* Reload alloc pointer */
|
2012-02-17 02:12:09 -08:00
|
|
|
sethi %hi(caml_young_ptr), %g1
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Return to caller */
|
|
|
|
retl
|
2012-02-17 02:12:09 -08:00
|
|
|
ld [%g1 + %lo(caml_young_ptr)], Alloc_ptr /* in delay slot */
|
1995-07-28 04:42:43 -07:00
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
/* Start the Ocaml program */
|
1995-07-28 04:42:43 -07:00
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_start_program
|
|
|
|
caml_start_program:
|
1995-07-28 04:42:43 -07:00
|
|
|
/* Save all callee-save registers */
|
|
|
|
save %sp, -96, %sp
|
1997-03-17 02:17:32 -08:00
|
|
|
/* Address of code to call */
|
2012-02-17 02:12:09 -08:00
|
|
|
Address(caml_program, %l2)
|
1995-12-19 08:00:40 -08:00
|
|
|
|
2003-12-31 06:20:40 -08:00
|
|
|
/* Code shared with caml_callback* */
|
1995-12-19 08:00:40 -08:00
|
|
|
L108:
|
1996-01-07 08:58:44 -08:00
|
|
|
/* Set up a callback link on the stack. */
|
1997-11-27 08:28:40 -08:00
|
|
|
sub %sp, 16, %sp
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_bottom_of_stack, %l0)
|
|
|
|
Load(caml_last_return_address, %l1)
|
|
|
|
Load(caml_gc_regs, %l3)
|
2002-11-29 07:03:08 -08:00
|
|
|
st %l0, [%sp + 96]
|
|
|
|
st %l1, [%sp + 100]
|
2012-02-17 02:12:09 -08:00
|
|
|
/* Set up a trap frame to catch exceptions escaping the Ocaml code */
|
1996-02-02 05:26:56 -08:00
|
|
|
call L111
|
2002-11-29 07:03:08 -08:00
|
|
|
st %l3, [%sp + 104]
|
1996-02-02 05:26:56 -08:00
|
|
|
b L110
|
|
|
|
nop
|
|
|
|
L111: sub %sp, 8, %sp
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_exception_pointer, Exn_ptr)
|
1997-07-18 06:35:00 -07:00
|
|
|
st %o7, [%sp + 96]
|
|
|
|
st Exn_ptr, [%sp + 100]
|
|
|
|
mov %sp, Exn_ptr
|
1995-12-20 02:48:10 -08:00
|
|
|
/* Reload allocation pointers */
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_young_ptr, Alloc_ptr)
|
2002-11-29 07:03:08 -08:00
|
|
|
#ifdef INDIRECT_LIMIT
|
2012-02-17 02:12:09 -08:00
|
|
|
Address(caml_young_limit, Alloc_limit)
|
2002-11-29 07:03:08 -08:00
|
|
|
#else
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_young_limit, Alloc_limit)
|
2002-11-29 07:03:08 -08:00
|
|
|
#endif
|
2012-02-17 02:12:09 -08:00
|
|
|
/* Call the Ocaml code */
|
1995-12-19 08:00:40 -08:00
|
|
|
L109: call %l2
|
|
|
|
nop
|
1995-12-20 02:48:10 -08:00
|
|
|
/* Pop trap frame and restore caml_exception_pointer */
|
1997-07-18 06:35:00 -07:00
|
|
|
ld [%sp + 100], Exn_ptr
|
1995-12-20 02:48:10 -08:00
|
|
|
add %sp, 8, %sp
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(Exn_ptr, caml_exception_pointer)
|
1997-11-27 08:28:40 -08:00
|
|
|
/* Pop callback link, restoring the global variables */
|
2002-11-29 07:03:08 -08:00
|
|
|
L112: ld [%sp + 96], %l0
|
|
|
|
ld [%sp + 100], %l1
|
1997-11-27 08:28:40 -08:00
|
|
|
ld [%sp + 104], %l2
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(%l0, caml_bottom_of_stack)
|
|
|
|
Store(%l1, caml_last_return_address)
|
|
|
|
Store(%l2, caml_gc_regs)
|
1997-11-27 08:28:40 -08:00
|
|
|
add %sp, 16, %sp
|
1995-12-20 02:48:10 -08:00
|
|
|
/* Save allocation pointer */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(Alloc_ptr, caml_young_ptr)
|
1995-12-19 08:00:40 -08:00
|
|
|
/* Reload callee-save registers and return */
|
|
|
|
ret
|
2002-11-29 07:03:08 -08:00
|
|
|
restore %o0, 0, %o0 /* copy %o0 in this window to caller's %o0 */
|
1995-12-20 02:48:10 -08:00
|
|
|
L110:
|
1995-12-22 01:40:50 -08:00
|
|
|
/* The trap handler */
|
2012-02-17 02:12:09 -08:00
|
|
|
Store(Exn_ptr, caml_exception_pointer)
|
1999-02-14 08:48:25 -08:00
|
|
|
/* Encode exception bucket as an exception result */
|
|
|
|
b L112
|
2002-11-29 07:03:08 -08:00
|
|
|
or %o0, 2, %o0
|
1995-12-19 08:00:40 -08:00
|
|
|
|
1997-03-17 02:17:32 -08:00
|
|
|
/* Raise an exception from C */
|
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_raise_exception
|
|
|
|
caml_raise_exception:
|
1997-03-17 02:17:32 -08:00
|
|
|
/* Save exception bucket in a register outside the reg windows */
|
1997-07-18 08:39:40 -07:00
|
|
|
mov %o0, %g2
|
|
|
|
/* Load exception pointer in a register outside the reg windows */
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_exception_pointer, %g3)
|
1997-03-17 02:17:32 -08:00
|
|
|
/* Pop some frames until the trap pointer is in the current frame. */
|
1997-07-18 08:39:40 -07:00
|
|
|
cmp %g3, %fp
|
1997-07-18 06:35:00 -07:00
|
|
|
blt L107 /* if Exn_ptr < %fp, over */
|
1997-05-19 08:42:21 -07:00
|
|
|
nop
|
1997-03-17 02:17:32 -08:00
|
|
|
L106: restore
|
1997-07-18 08:39:40 -07:00
|
|
|
cmp %fp, %g3 /* if %fp <= Exn_ptr, loop */
|
1997-03-17 02:17:32 -08:00
|
|
|
ble L106
|
|
|
|
nop
|
1997-07-18 08:39:40 -07:00
|
|
|
L107:
|
|
|
|
/* Reload allocation registers */
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_young_ptr, Alloc_ptr)
|
2002-11-29 07:03:08 -08:00
|
|
|
#ifdef INDIRECT_LIMIT
|
2012-02-17 02:12:09 -08:00
|
|
|
Address(caml_young_limit, Alloc_limit)
|
2002-11-29 07:03:08 -08:00
|
|
|
#else
|
2012-02-17 02:12:09 -08:00
|
|
|
Load(caml_young_limit, Alloc_limit)
|
2002-11-29 07:03:08 -08:00
|
|
|
#endif
|
1997-07-18 08:39:40 -07:00
|
|
|
/* Branch to exception handler */
|
|
|
|
mov %g3, %sp
|
1997-07-18 06:35:00 -07:00
|
|
|
ld [%sp + 96], %g1
|
|
|
|
ld [%sp + 100], Exn_ptr
|
1997-03-17 02:17:32 -08:00
|
|
|
add %sp, 8, %sp
|
1997-07-18 06:35:00 -07:00
|
|
|
jmp %g1 + 8
|
1997-03-17 02:17:32 -08:00
|
|
|
/* Restore bucket, in delay slot */
|
1997-07-18 08:39:40 -07:00
|
|
|
mov %g2, %o0
|
1997-03-17 02:17:32 -08:00
|
|
|
|
|
|
|
/* Callbacks C -> ML */
|
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_callback_exn
|
|
|
|
caml_callback_exn:
|
1997-03-17 02:17:32 -08:00
|
|
|
/* Save callee-save registers and return address */
|
|
|
|
save %sp, -96, %sp
|
|
|
|
/* Initial shuffling of arguments */
|
|
|
|
mov %i0, %g1
|
|
|
|
mov %i1, %i0 /* first arg */
|
|
|
|
mov %g1, %i1 /* environment */
|
|
|
|
b L108
|
|
|
|
ld [%g1], %l2 /* code pointer */
|
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_callback2_exn
|
|
|
|
caml_callback2_exn:
|
1995-12-19 08:00:40 -08:00
|
|
|
/* Save callee-save registers and return address */
|
|
|
|
save %sp, -104, %sp
|
|
|
|
/* Initial shuffling of arguments */
|
|
|
|
mov %i0, %g1
|
|
|
|
mov %i1, %i0 /* first arg */
|
|
|
|
mov %i2, %i1 /* second arg */
|
|
|
|
mov %g1, %i2 /* environment */
|
2012-02-17 02:12:09 -08:00
|
|
|
sethi %hi(caml_apply2), %l2
|
1995-12-19 08:00:40 -08:00
|
|
|
b L108
|
2012-02-17 02:12:09 -08:00
|
|
|
or %l2, %lo(caml_apply2), %l2
|
1995-12-19 08:00:40 -08:00
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_callback3_exn
|
|
|
|
caml_callback3_exn:
|
1995-12-19 08:00:40 -08:00
|
|
|
/* Save callee-save registers and return address */
|
|
|
|
save %sp, -104, %sp
|
|
|
|
/* Initial shuffling of arguments */
|
|
|
|
mov %i0, %g1
|
|
|
|
mov %i1, %i0 /* first arg */
|
|
|
|
mov %i2, %i1 /* second arg */
|
|
|
|
mov %i3, %i2 /* third arg */
|
|
|
|
mov %g1, %i3 /* environment */
|
2012-02-17 02:12:09 -08:00
|
|
|
sethi %hi(caml_apply3), %l2
|
1995-12-19 08:00:40 -08:00
|
|
|
b L108
|
2012-02-17 02:12:09 -08:00
|
|
|
or %l2, %lo(caml_apply3), %l2
|
1995-12-19 08:00:40 -08:00
|
|
|
|
2004-08-12 09:04:07 -07:00
|
|
|
#ifndef SYS_solaris
|
|
|
|
/* Glue code to call [caml_array_bound_error] */
|
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_ml_array_bound_error
|
|
|
|
caml_ml_array_bound_error:
|
|
|
|
Address(caml_array_bound_error, %g2)
|
|
|
|
b caml_c_call
|
2004-08-12 09:04:07 -07:00
|
|
|
nop
|
|
|
|
#endif
|
|
|
|
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_system__code_end
|
|
|
|
caml_system__code_end:
|
|
|
|
|
2002-11-29 07:03:08 -08:00
|
|
|
#ifdef SYS_solaris
|
|
|
|
.section ".rodata"
|
|
|
|
#else
|
1995-12-19 08:00:40 -08:00
|
|
|
.data
|
2002-11-29 07:03:08 -08:00
|
|
|
#endif
|
2012-02-17 02:12:09 -08:00
|
|
|
.global caml_system__frametable
|
2004-10-05 23:33:25 -07:00
|
|
|
.align 4 /* required for gas? */
|
2012-02-17 02:12:09 -08:00
|
|
|
caml_system__frametable:
|
1995-12-19 08:00:40 -08:00
|
|
|
.word 1 /* one descriptor */
|
|
|
|
.word L109 /* return address into callback */
|
|
|
|
.half -1 /* negative frame size => use callback link */
|
|
|
|
.half 0 /* no roots */
|
2002-11-29 07:03:08 -08:00
|
|
|
|
|
|
|
#ifdef SYS_solaris
|
2012-02-17 02:12:09 -08:00
|
|
|
.type caml_allocN, #function
|
|
|
|
.type caml_call_gc, #function
|
|
|
|
.type caml_c_call, #function
|
|
|
|
.type caml_start_program, #function
|
|
|
|
.type caml_raise_exception, #function
|
|
|
|
.type caml_system__frametable, #object
|
2002-11-29 07:03:08 -08:00
|
|
|
#endif
|