Commit b619d74d authored by daan's avatar daan
Browse files

[project @ 2000-06-15 13:18:08 by daan]

Added definition of int64 to make it compilable with both gcc and VisualC++

Added functions to the bytecode assembler that
support code generation for Xmlambda. All additions for
Xmlambda are surrounded by #ifdef XMLAMBDA.
parent d188050a
/* -----------------------------------------------------------------------------
* $Id: Assembler.h,v 1.14 2000/05/09 10:00:35 sewardj Exp $
* $Id: Assembler.h,v 1.15 2000/06/15 13:18:08 daan Exp $
* (c) The GHC Team 1994-1998.
......@@ -15,6 +15,18 @@
/* ToDo: put this somewhere more sensible */
extern void DEBUG_LoadSymbols( char *name );
/* Make this compilable with Visual C++ */
#ifndef HAVE_INT64
#define HAVE_INT64
#ifdef _MSC_VER
typedef __int64 int64;
typedef unsigned __int64 nat64;
typedef long long int64;
typedef unsigned long long nat64;
/* This file is supposed to be somewhat self-contained because it is one
* of the major external interfaces to the runtime system.
* Keeping it self-contained reduces the chance of conflict with Hugs
......@@ -29,7 +41,7 @@ extern void DEBUG_LoadSymbols( char *name );
typedef unsigned char AsmNat8;
typedef unsigned int AsmNat;
typedef signed int AsmInt;
typedef signed long long int AsmInt64; /* ToDo: not portable! */
typedef int64 AsmInt64;
typedef unsigned int AsmWord;
typedef void* AsmAddr;
typedef unsigned char AsmChar;
......@@ -299,6 +311,34 @@ extern AsmVar asmAllocPAP ( AsmBCO bco, AsmNat size );
extern AsmSp asmBeginMkPAP ( AsmBCO bco );
extern void asmEndMkPAP ( AsmBCO bco, AsmVar v, AsmSp start );
XMlambda primitives.
typedef AsmInt AsmIndex;
/* Rows */
extern AsmVar asmAllocRow ( AsmBCO bco, AsmNat /*number of fields*/ n );
extern AsmSp asmBeginPackRow ( AsmBCO bco );
extern void asmEndPackRow ( AsmBCO bco, AsmVar v, AsmSp start,
AsmNat /*number of fields*/ n );
extern void asmBeginUnpackRow( AsmBCO bco );
extern void asmEndUnpackRow ( AsmBCO bco );
extern AsmPrim primRowRemoveAtN;
extern AsmPrim primRowIndexAtN;
/* Inj */
extern AsmVar asmInj( AsmBCO bco, AsmVar var );
extern AsmVar asmInjConst( AsmBCO bco, AsmIndex i );
extern AsmVar asmUnInj( AsmBCO bco );
extern AsmPc asmTestInj( AsmBCO bco, AsmVar var );
extern AsmPc asmTestInjConst( AsmBCO, AsmIndex i );
extern AsmVar asmConstIndex( AsmBCO bco, AsmIndex x );
/* --------------------------------------------------------------------------
* C-call and H-call
* ------------------------------------------------------------------------*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment