Exemple #1
0
};

opcode_entry    Un87[] = {
/***************************/
/*       op    res   eq        verify       gen            reg             fu*/
{_UnPP(  M,    M,    EQ_R1 ),  V_NEGATE,    R_FLIPSIGN,    RG_8087_ZAP_ACC,FU_NO},
{_UnPP(  C,    ANY,  NONE ),   V_OP1ZERO,   G_UNKNOWN,     RG_8087,        FU_NO},
{_UnPP(  C,    ANY,  NONE ),   V_OP1ONE,    G_UNKNOWN,     RG_8087,        FU_NO},
{_UnPP(  C,    ANY,  NONE ),   V_NO,        R_FORCEOP1CMEM,RG_8087,        FU_NO},
{_UnPP(  ANY,  ANY,  NONE ),   V_NO,        G_UNKNOWN,     RG_8087,        FU_NO},
};

opcode_entry    Un87Func[] = {
/****************************/
/*       op    res   eq        verify       gen            reg             fu*/
{_Un(    C,    ANY,  NONE ),   V_OP1ZERO,   G_UNKNOWN,     RG_8087_ZAP_ACC,FU_NO},
{_Un(    C,    ANY,  NONE ),   V_OP1ONE,    G_UNKNOWN,     RG_8087_ZAP_ACC,FU_NO},
{_Un(    C,    ANY,  NONE ),   V_NO,        R_FORCEOP1CMEM,RG_8087_ZAP_ACC,FU_NO},
{_Un(    ANY,  ANY,  NONE ),   V_NO,        G_UNKNOWN,     RG_8087_ZAP_ACC,FU_NO},
};

opcode_entry    Push87S[] = {
/*****************************/
/*       op    res   eq        verify       gen            reg             fu*/
#if _TARGET & _TARG_IAPX86
{_Un(    R|M|C,ANY,  NONE ),   V_NO,        R_SPLITUNARY,  RG_DBL_OR_PTR,  FU_NO},
#else
{_UnPP(  R,    ANY,  NONE ),   V_NO,        G_WORDR1,      RG_DBL,         FU_FOP},
{_UnPP(  M,    ANY,  NONE ),   V_NO,        G_M1,          RG_,            FU_FOP},
{_UnPP(  C,    ANY,  NONE ),   V_NO,        G_PUSHFS,      RG_,            FU_FOP},
#endif
Exemple #2
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 ),
Exemple #3
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 ),
Exemple #4
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 ),
Exemple #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 ),
};

Exemple #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 ),
Exemple #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 ),
Exemple #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  */