main_run.h 1.55 KB
/*
 * Copyright (C) 1996-1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * 
 * This file is part of the SimOS distribution. 
 * See LICENSE file for terms of the license. 
 *
 */

#ifndef MAIN_RUN_H
#define MAIN_RUN_H

#ifndef _LANGUAGE_ASSEMBLY


/* This restores the stack pointer and the s registers, so routines */
/* can correctly reetner emitted code (via continue_run) without causing an */
/*   eventual stack overflow */
C_LINK  void (*EnterTC)( EmbraState* );

/* Same as above except also do a context switch */
C_LINK  void (*EnterTC_CX)( EmbraState* );

/* This is a variant of the main dispatch loop */
/* which does not chain.  This is used by exceptions, and returns */
/* after TC flushes */
C_LINK  void (*continue_run_without_chaining)( void );
/* This is the standard dispatch loop.  It looks up the next */
/* instruction and translates the next block (if need be) */
C_LINK  void (*continue_run)( void );

C_LINK  void (*UPperiodic_callout)(void);
/* For MP in UP. */
C_LINK  void (*Embra_CX)(void);

C_LINK void (*Embra_CX_nochain)(void);

C_LINK void SyncInstr(void);


/* ****************************************************************
 * SpillFP and RestoreFP can only be called from assembly 
 * as they access VSS_BASE 
 * ****************************************************************/

C_LINK void (*SpillFP)(EmbraState*);
C_LINK void (*RestoreFP)(EmbraState*);

/* Called from translator.c to generate interface code dynamically */
void GenInterfaceCode(void);
  
#endif /* _LANGUAGE_ASSEMBLY */

#endif /* MAIN_RUN_H */