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 GNU Library General Public License. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $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;
|
1997-07-30 05:28:31 -07:00
|
|
|
extern unsigned char code_md5[16];
|
1996-05-28 05:41:37 -07:00
|
|
|
|
1997-09-02 05:55:01 -07:00
|
|
|
void load_code (int fd, asize_t len);
|
|
|
|
void fixup_endianness (code_t code, asize_t len);
|
|
|
|
void set_instruction (code_t pos, opcode_t instr);
|
2001-02-19 04:29:00 -08:00
|
|
|
int is_instruction (opcode_t instr1, opcode_t instr2);
|
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-09-02 05:55:01 -07:00
|
|
|
void thread_code (code_t code, asize_t len);
|
1997-02-02 06:53:44 -08:00
|
|
|
#endif
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
#endif
|