Esempio n. 1
0
#include "convins.h"
#include "data.h"
#include "namelist.h"
#include "insutil.h"


extern  void            UpdateLive(instruction*,instruction*);
extern  name            *TrimConst( name *, type_class_def );

#define BITS_IN_WORD    64


static  opcode_entry    ctable_FDTOS[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    R,    NONE ),  V_NO,         RG_FLOAT,     G_CVTTS,        FU_NO ),
_OE( _Un( C,    ANY,  NONE ),  V_NO,         RG_FLOAT,     R_FORCEOP1CMEM, FU_NO ),
_OE( _Un( M,    ANY,  NONE ),  V_NO,         RG_FLOAT,     R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  M,    NONE ),  V_NO,         RG_FLOAT,     R_MOVRESTEMP,   FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_FLOAT_NEED,G_UNKNOWN,      FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_,          G_UNKNOWN,      FU_NO ),
};

static  opcode_entry    ctable_FSTOD[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    R,    NONE ),  V_NO,         RG_FLOAT,     G_MOVE_FP,      FU_NO ),
_OE( _Un( C,    ANY,  NONE ),  V_NO,         RG_FLOAT,     R_FORCEOP1CMEM, FU_NO ),
_OE( _Un( M,    ANY,  NONE ),  V_NO,         RG_FLOAT,     R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  M,    NONE ),  V_NO,         RG_FLOAT,     R_MOVRESTEMP,   FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_FLOAT_NEED,G_UNKNOWN,      FU_NO ),
Esempio n. 2
0
#include "zoiks.h"
#include "makeins.h"
#include "convins.h"
#include "data.h"
#include "namelist.h"

extern  void            PrefixIns( instruction *, instruction * );
extern  void            ReplIns( instruction *, instruction * );
extern  void            UpdateLive( instruction *, instruction * );
extern  name            *TrimConst( name *, type_class_def );


static  opcode_entry    ctable_FDTOS[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    R,   NONE ),   V_NO,         RG_FLOAT,     G_CVTTS,        FU_NO ),
_OE( _Un( C,    ANY, NONE ),   V_NO,         RG_FLOAT,     R_FORCEOP1CMEM, FU_NO ),
_OE( _Un( M,    ANY, NONE ),   V_NO,         RG_FLOAT,     R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  M,   NONE ),   V_NO,         RG_FLOAT,     R_MOVRESTEMP,   FU_NO ),
_OE( _Un( ANY,  ANY, NONE ),   V_NO,         RG_FLOAT_NEED,G_UNKNOWN,      FU_NO ),
_OE( _Un( ANY,  ANY, NONE ),   V_NO,         RG_,          G_UNKNOWN,      FU_NO ),
};

static  opcode_entry    ctable_FSTOD[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    R,   NONE ),   V_NO,         RG_FLOAT,     G_MOVE_FP,      FU_NO ),
_OE( _Un( C,    ANY, NONE ),   V_NO,         RG_FLOAT,     R_FORCEOP1CMEM, FU_NO ),
_OE( _Un( M,    ANY, NONE ),   V_NO,         RG_FLOAT,     R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  M,   NONE ),   V_NO,         RG_FLOAT,     R_MOVRESTEMP,   FU_NO ),
_OE( _Un( ANY,  ANY, NONE ),   V_NO,         RG_FLOAT_NEED,G_UNKNOWN,      FU_NO ),
Esempio n. 3
0
* Description:  Table translating generic cg "assembler" to PowerPC
*               specific instructions.
*
****************************************************************************/


#include "cgstd.h"
#include "coderep.h"
#include "regset.h"
#include "model.h"
#include "tables.h"

opcode_entry    StubUnary[] = {
/*************************/
/*           from  to    eq            verify          reg           gen             fu  */
_OE( _Un(    ANY,  ANY,  NONE ),       V_NO,           RG_DWORD,     G_NO,           FU_NO ),
_OE( _Un(    ANY,  ANY,  NONE ),       V_NO,           RG_,          G_UNKNOWN,      FU_NO ),
};


opcode_entry    StubBinary[] = {
/************************/
/*           op1   op2   res   eq      verify          reg           gen             fu  */
_OE( _Bin(   ANY,  ANY,  ANY,  NONE ), V_NO,           RG_DWORD,     G_NO,           FU_NO ),
_OE( _Bin(   ANY,  ANY,  ANY,  NONE ), V_NO,           RG_,          G_UNKNOWN,      FU_NO ),
};

opcode_entry    StubSide[] = {
/******************************/
/*           op1   op2                 verify          reg           gen             fu  */
_OE( _Side(  ANY,  ANY ),              V_NO,           RG_DWORD,     G_NO,           FU_NO ),
Esempio n. 4
0
extern  int             FPStkReq( instruction * );
extern  bool            InsOrderDependant( instruction *, instruction * );

/* forward declarations */
static  void            PushStack( instruction *ins );
static  void            IncrementAll( void );
static  void            DecrementAll( void );
static  void            PopStack( instruction *ins );
static  void            PushVirtualStack( instruction *ins );
static  void            GetToTopOfStack( instruction *ins, int virtual_reg );
static  void            PopVirtualStack( instruction *ins );


static  opcode_entry    RFST[1] = {
/*           op1   op2   res   eq      verify          reg           gen             fu  */
_OE(                         PRESERVE, V_NO,           RG_,          G_RFST,         FU_NO )
};
static  opcode_entry    RFSTNP[1] = {
/*           op1   op2   res   eq      verify          reg           gen             fu  */
_OE(                         PRESERVE, V_NO,           RG_,          G_RFSTNP,       FU_NO )
};
static  opcode_entry    RFLD[1] = {
/*           op1   op2   res   eq      verify          reg           gen             fu  */
_OE(                         PRESERVE, V_NO,           RG_,          G_RFLD,         FU_NO )
};
static  opcode_entry    RCOMP[1] = {
/*           op1   op2   res   eq      verify          reg           gen             fu  */
_OE(                         PRESERVE, V_NO,           RG_,          G_RCOMP,        FU_NO )
};
static  opcode_entry    FCOMPP[1] = {
/*           op1   op2   res   eq      verify          reg           gen             fu  */
Esempio n. 5
0
#include "cgstd.h"
#include "coderep.h"
#include "makeins.h"
#include "zoiks.h"
#include "convins.h"
#include "data.h"
#include "namelist.h"
#include "insutil.h"
#include "inssegs.h"
#include "foldins.h"


static  opcode_entry    ctable_C2TO1[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    ANY,  NONE ),  V_NO,         RG_TWOBYTE,   R_MOVELOW,      FU_NO ),
_OE( _Un( R,    ANY,  NONE ),  V_NO,         RG_,          R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( U,    ANY,  NONE ),  V_CONSTTEMP,  RG_,          G_UNKNOWN,      FU_NO ),
_OE( _Un( C,    ANY,  NONE ),  V_OP1RELOC,   RG_,          R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_,          R_MOVELOW,      FU_NO ),
};


static  opcode_entry    ctable_C4TO1[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_DBL_BYTE,  R_CONVERT_LOW,  FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_,          G_UNKNOWN,      FU_NO ),
};

Esempio n. 6
0
#include "coderep.h"
#include "zoiks.h"
#include "makeins.h"
#include "convins.h"
#include "data.h"
#include "namelist.h"
#include "insutil.h"


extern  void            UpdateLive(instruction*,instruction*);


static  opcode_entry    ctable_FSTOD[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    R,    NONE ),  V_NO,         RG_FLOAT,     G_MOVE_FP,      FU_NO ),
_OE( _Un( C,    ANY,  NONE ),  V_NO,         RG_FLOAT,     R_FORCEOP1CMEM, FU_NO ),
_OE( _Un( M,    ANY,  NONE ),  V_NO,         RG_FLOAT,     R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  M,    NONE ),  V_NO,         RG_FLOAT,     R_MOVRESTEMP,   FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_FLOAT_NEED,G_UNKNOWN,      FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_,          G_UNKNOWN,      FU_NO ),
};

#if 0
static  opcode_entry    ctable_FDToI4[] = {
/*****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    M,    NONE ),  V_NO,         RG_FLOAT,     G_FREGTOMI4,    FU_NO ),
_OE( _Un( M|C,  M,    NONE ),  V_NO,         RG_FLOAT,     R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  R,    NONE ),  V_NO,         RG_FD,        R_MOVRESTEMP,   FU_NO ),
_OE( _Un( R,    U,    NONE ),  V_NO,         RG_,          R_FORCERESMEM,  FU_NO ),
Esempio n. 7
0
* Description:  Table translating generic cg "assembler" to Alpha AXP
*               specific instructions.
*
****************************************************************************/


#include "cgstd.h"
#include "coderep.h"
#include "regset.h"
#include "model.h"
#include "tables.h"

opcode_entry    StubUnary[] = {
/*************************/
/*           from  to    eq            verify          reg           gen             fu  */
_OE( _Un(    ANY,  ANY,  NONE ),       V_NO,           RG_DWORD,     G_NO,           FU_NO ),
_OE( _Un(    ANY,  ANY,  NONE ),       V_NO,           RG_,          G_UNKNOWN,      FU_NO ),
};


opcode_entry    StubBinary[] = {
/************************/
/*           op1   op2   res   eq      verify          reg           gen             fu  */
_OE( _Bin(   ANY,  ANY,  ANY,  NONE ), V_NO,           RG_DWORD,     G_NO,           FU_NO ),
_OE( _Bin(   ANY,  ANY,  ANY,  NONE ), V_NO,           RG_,          G_UNKNOWN,      FU_NO ),
};

opcode_entry    StubSide[] = {
/******************************/
/*           op1   op2                 verify          reg           gen             fu  */
_OE( _Side(  ANY,  ANY ),              V_NO,           RG_DWORD,     G_NO,           FU_NO ),
Esempio n. 8
0
#include "_cgstd.h"
#include "coderep.h"
#include "model.h"
#include "makeins.h"
#include "zoiks.h"
#include "convins.h"
#include "namelist.h"
#include "insutil.h"
#include "inssegs.h"
#include "_split.h"


static const opcode_entry    ctable_C2TO1[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( R,    ANY,  NONE ),  V_NO,         RG_TWOBYTE,   R_MOVELOW,      FU_NO ),
_OE( _Un( R,    ANY,  NONE ),  V_NO,         RG_,          R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_,          R_MOVELOW,      FU_NO ),
};

static const opcode_entry    ctable_C4TO1[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */
_OE( _Un( U,    ANY,  NONE ),  V_CONSTTEMP,  RG_,          G_UNKNOWN,      FU_NO ),
_OE( _Un( C,    ANY,  NONE ),  V_OP1RELOC,   RG_,          R_MOVOP1TEMP,   FU_NO ),
_OE( _Un( ANY,  ANY,  NONE ),  V_NO,         RG_,          R_CONVERT_LOW,  FU_NO ),
};

static const opcode_entry    ctable_C4TO2[] = {
/****************************************/
/*        from  to    eq       verify        reg           gen             fu  */