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 */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* Automatique. Distributed only by permission. */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
1996-11-29 10:36:42 -08:00
|
|
|
/* Handling of blocks of bytecode (endianness switch, threading). */
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
#ifndef _fix_code_
|
|
|
|
#define _fix_code_
|
|
|
|
|
|
|
|
|
1996-05-28 05:41:37 -07:00
|
|
|
#include "config.h"
|
1995-05-04 03:15:53 -07:00
|
|
|
#include "misc.h"
|
|
|
|
#include "mlvalues.h"
|
|
|
|
|
1996-11-29 10:36:42 -08:00
|
|
|
extern code_t start_code;
|
|
|
|
extern asize_t code_size;
|
|
|
|
extern unsigned char * saved_code;
|
1996-05-28 05:41:37 -07:00
|
|
|
|
1996-11-29 10:36:42 -08:00
|
|
|
void load_code P((int fd, asize_t len));
|
1995-05-04 03:15:53 -07:00
|
|
|
void fixup_endianness P((code_t code, asize_t len));
|
1996-11-29 10:36:42 -08:00
|
|
|
void set_instruction P((code_t pos, opcode_t instr));
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1997-02-02 06:53:44 -08:00
|
|
|
#ifdef THREADED_CODE
|
1997-05-03 11:33:16 -07:00
|
|
|
extern char ** instr_table;
|
|
|
|
extern char * instr_base;
|
1997-02-02 06:53:44 -08:00
|
|
|
void thread_code P((code_t code, asize_t len));
|
|
|
|
#endif
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
#endif
|