opcodes.h   opcodes.h 
skipping to change at line 113 skipping to change at line 113
BINARY_WL(muluwl, "(uint16_t)%s * (uint16_t)%s") BINARY_WL(muluwl, "(uint16_t)%s * (uint16_t)%s")
BINARY_WL(mergewl, "((uint16_t)%s) | ((uint16_t)%s << 16)") BINARY_WL(mergewl, "((uint16_t)%s) | ((uint16_t)%s << 16)")
BINARY_BW(mergebw, "((uint8_t)%s) | ((uint8_t)%s << 8)") BINARY_BW(mergebw, "((uint8_t)%s) | ((uint8_t)%s << 8)")
UNARY_WB(select0wb, "(uint16_t)%s & 0xff") UNARY_WB(select0wb, "(uint16_t)%s & 0xff")
UNARY_WB(select1wb, "((uint16_t)%s >> 8)&0xff") UNARY_WB(select1wb, "((uint16_t)%s >> 8)&0xff")
UNARY_LW(select0lw, "(uint32_t)%s & 0xffff") UNARY_LW(select0lw, "(uint32_t)%s & 0xffff")
UNARY_LW(select1lw, "((uint32_t)%s >> 16)&0xffff") UNARY_LW(select1lw, "((uint32_t)%s >> 16)&0xffff")
UNARY_UW(swapw, "ORC_SWAP_W(%s)") UNARY_UW(swapw, "ORC_SWAP_W(%s)")
UNARY_UL(swapl, "ORC_SWAP_L(%s)") UNARY_UL(swapl, "ORC_SWAP_L(%s)")
BINARY_F(addf, "%s + %s")
BINARY_F(subf, "%s - %s")
BINARY_F(mulf, "%s * %s")
BINARY_F(divf, "%s / %s")
UNARY_F(sqrtf, "sqrt(%s)")
BINARY_F(maxf, "ORC_MAX(%s,%s)")
BINARY_F(minf, "ORC_MIN(%s,%s)")
BINARY_FL(cmpeqf, "(%s == %s) ? (~0) : 0")
BINARY_FL(cmpltf, "(%s < %s) ? (~0) : 0")
BINARY_FL(cmplef, "(%s <= %s) ? (~0) : 0")
UNARY_FL(convfl, "rintf(%s)")
UNARY_LF(convlf, "%s")
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added


 orc-stdint.h   orc-stdint.h 
#ifndef _ORC_ORC_ORC_STDINT_H #ifndef _ORC_ORC_ORC_STDINT_H
#define _ORC_ORC_ORC_STDINT_H 1 #define _ORC_ORC_ORC_STDINT_H 1
#ifndef _GENERATED_STDINT_H #ifndef _GENERATED_STDINT_H
#define _GENERATED_STDINT_H "orc 0.4.2" #define _GENERATED_STDINT_H "orc 0.4.3"
/* generated using gnu compiler gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revi sion 150839] */ /* generated using gnu compiler gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revi sion 150839] */
#define _STDINT_HAVE_STDINT_H 1 #define _STDINT_HAVE_STDINT_H 1
#include <stdint.h> #include <stdint.h>
#endif #endif
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 orc.h   orc.h 
#ifndef _ORC_ORC_H_ #ifndef _ORC_ORC_H_
#define _ORC_ORC_H_ #define _ORC_ORC_H_
#include <orc/orcprogram.h> #include <orc/orcprogram.h>
#include <orc/orc-stdint.h> #include <orc/orc-stdint.h>
#include <orc/orcarm.h> #include <orc/orcarm.h>
#include <orc/orcdebug.h> #include <orc/orcdebug.h>
#include <orc/orcfunctions.h>
#include <orc/orcmmx.h> #include <orc/orcmmx.h>
#include <orc/orconce.h>
#include <orc/orcparse.h> #include <orc/orcparse.h>
#include <orc/orcprogram.h> #include <orc/orcprogram.h>
#include <orc/orcsse.h> #include <orc/orcsse.h>
#include <orc/orcutils.h> #include <orc/orcutils.h>
#include <orc/orcx86.h> #include <orc/orcx86.h>
#include <orc/orcpowerpc.h> #include <orc/orcpowerpc.h>
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 orcarm.h   orcarm.h 
skipping to change at line 63 skipping to change at line 63
ORC_ARM_COND_VC, ORC_ARM_COND_VC,
ORC_ARM_COND_HI, ORC_ARM_COND_HI,
ORC_ARM_COND_LS, ORC_ARM_COND_LS,
ORC_ARM_COND_GE, ORC_ARM_COND_GE,
ORC_ARM_COND_LT, ORC_ARM_COND_LT,
ORC_ARM_COND_GT, ORC_ARM_COND_GT,
ORC_ARM_COND_LE, ORC_ARM_COND_LE,
ORC_ARM_COND_AL, ORC_ARM_COND_AL,
} OrcArmCond; } OrcArmCond;
typedef enum {
ORC_ARM_LSL,
ORC_ARM_LSR,
ORC_ARM_ASR,
ORC_ARM_ROR
} OrcArmShift;
void orc_arm_emit (OrcCompiler *compiler, uint32_t insn); void orc_arm_emit (OrcCompiler *compiler, uint32_t insn);
void orc_arm_emit_bx_lr (OrcCompiler *compiler); void orc_arm_emit_bx_lr (OrcCompiler *compiler);
const char * orc_arm_reg_name (int reg); const char * orc_arm_reg_name (int reg);
void orc_arm_emit_loadimm (OrcCompiler *compiler, int dest, int imm); const char * orc_arm_cond_name (OrcArmCond cond);
void orc_arm_emit_load_imm (OrcCompiler *compiler, int dest, int imm);
void orc_arm_emit_add (OrcCompiler *compiler, int dest, int src1, int src2) ; void orc_arm_emit_add (OrcCompiler *compiler, int dest, int src1, int src2) ;
void orc_arm_emit_sub (OrcCompiler *compiler, int dest, int src1, int src2) ; void orc_arm_emit_sub (OrcCompiler *compiler, int dest, int src1, int src2) ;
void orc_arm_emit_add_imm (OrcCompiler *compiler, int dest, int src1, int v alue); void orc_arm_emit_add_imm (OrcCompiler *compiler, int dest, int src1, int v alue);
void orc_arm_emit_and_imm (OrcCompiler *compiler, int dest, int src1, int v alue);
void orc_arm_emit_sub_imm (OrcCompiler *compiler, int dest, int src1, int v alue); void orc_arm_emit_sub_imm (OrcCompiler *compiler, int dest, int src1, int v alue);
void orc_arm_emit_asr_imm (OrcCompiler *compiler, int dest, int src1, int v
alue);
void orc_arm_emit_lsl_imm (OrcCompiler *compiler, int dest, int src1, int v
alue);
void orc_arm_emit_cmp_imm (OrcCompiler *compiler, int src1, int value); void orc_arm_emit_cmp_imm (OrcCompiler *compiler, int src1, int value);
void orc_arm_emit_cmp (OrcCompiler *compiler, int src1, int src2);
void orc_arm_emit_mov (OrcCompiler *compiler, int dest, int src);
void orc_arm_emit_align (OrcCompiler *compiler, int align_shift);
void orc_arm_emit_label (OrcCompiler *compiler, int label); void orc_arm_emit_label (OrcCompiler *compiler, int label);
void orc_arm_emit_push (OrcCompiler *compiler, int regs); void orc_arm_emit_push (OrcCompiler *compiler, int regs);
void orc_arm_emit_pop (OrcCompiler *compiler, int regs); void orc_arm_emit_pop (OrcCompiler *compiler, int regs);
void orc_arm_emit_mov (OrcCompiler *compiler, int dest, int src);
void orc_arm_emit_branch (OrcCompiler *compiler, int cond, int label); void orc_arm_emit_branch (OrcCompiler *compiler, int cond, int label);
void orc_arm_emit_dp_reg (OrcCompiler *compiler, int cond, int opcode, int
dest,
int src1, int src2);
void orc_arm_loadw (OrcCompiler *compiler, int dest, int src1, int offset); void orc_arm_loadw (OrcCompiler *compiler, int dest, int src1, int offset);
void orc_arm_storew (OrcCompiler *compiler, int dest, int offset, int src1) ; void orc_arm_storew (OrcCompiler *compiler, int dest, int offset, int src1) ;
void orc_arm_emit_load_reg (OrcCompiler *compiler, int dest, int src1, int offset); void orc_arm_emit_load_reg (OrcCompiler *compiler, int dest, int src1, int offset);
void orc_arm_emit_store_reg (OrcCompiler *compiler, int src, int dest, int offset);
void orc_arm_add_fixup (OrcCompiler *compiler, int label, int type);
void orc_arm_do_fixups (OrcCompiler *compiler); void orc_arm_do_fixups (OrcCompiler *compiler);
void orc_arm_emit_dp (OrcCompiler *p, int type, OrcArmCond cond, OrcArmDP o
pcode,
int S, int Rd, int Rn, int Rm, int shift, uint32_t val);
void orc_arm_emit_par (OrcCompiler *p, int op, int mode, OrcArmCond cond,
int Rd, int Rn, int Rm);
void orc_arm_emit_xt (OrcCompiler *p, int op, OrcArmCond cond,
int Rd, int Rn, int Rm, int r8);
void orc_arm_emit_pkh (OrcCompiler *p, int op, OrcArmCond cond,
int Rd, int Rn, int Rm, int sh);
void orc_arm_emit_sat (OrcCompiler *p, int op, OrcArmCond cond,
int Rd, int sat, int Rm, int sh, int asr);
void orc_arm_emit_rv (OrcCompiler *p, int op, OrcArmCond cond,
int Rd, int Rm);
void orc_arm_flush_cache (OrcCompiler *compiler);
/* ALL cpus */
/* data procesing instructions */
/* <op>{<cond>}{s} {<Rd>}, <Rn>, #imm */
#define orc_arm_emit_and_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_AND,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_eor_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_EOR,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_sub_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_SUB,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_rsb_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_RSB,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_add_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_ADD,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_adc_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_ADC,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_sbc_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_SBC,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_rsc_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_RSC,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_tst_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_TST,1, 0,Rn,0,0,imm)
#define orc_arm_emit_teq_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_TEQ,1, 0,Rn,0,0,imm)
#define orc_arm_emit_cmp_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_CMP,1, 0,Rn,0,0,imm)
#define orc_arm_emit_cmn_i(p,cond,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_CMN,1, 0,Rn,0,0,imm)
#define orc_arm_emit_orr_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_ORR,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_mov_i(p,cond,S,Rd,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_MOV,S,Rd, 0,0,0,imm)
#define orc_arm_emit_bic_i(p,cond,S,Rd,Rn,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_BIC,S,Rd,Rn,0,0,imm)
#define orc_arm_emit_mvn_i(p,cond,S,Rd,imm) orc_arm_emit_dp(p,0,c
ond,ORC_ARM_DP_MVN,S,Rd, 0,0,0,imm)
/* <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm> */
#define orc_arm_emit_and_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_eor_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_sub_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_rsb_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_add_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_adc_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_sbc_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_rsc_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_tst_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_TST,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_teq_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_cmp_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_cmn_r(p,cond,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_orr_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_mov_r(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,0,0)
#define orc_arm_emit_bic_r(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_mvn_r(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,1,c
ond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,0,0)
/* <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm>, [LSL|LSR|ASR] #imm */
#define orc_arm_emit_and_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_eor_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_sub_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_rsb_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_add_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_adc_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_sbc_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_rsc_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_tst_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_TST,1, 0,Rn,Rm,sh,im)
#define orc_arm_emit_teq_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,sh,im)
#define orc_arm_emit_cmp_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,sh,im)
#define orc_arm_emit_cmn_rsi(p,cond,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,sh,im)
#define orc_arm_emit_orr_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_mov_rsi(p,cond,S,Rd,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,sh,im)
#define orc_arm_emit_bic_rsi(p,cond,S,Rd,Rn,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,sh,im)
#define orc_arm_emit_mvn_rsi(p,cond,S,Rd,Rm,sh,im) orc_arm_emit_dp(p,2,c
ond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,sh,im)
/* <op>{<cond>}{s} {<Rd>}, <Rn>, <Rm>, [LSL|LSR|ASR] <Rs> */
#define orc_arm_emit_and_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_eor_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_sub_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_rsb_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_add_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_adc_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_sbc_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_rsc_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_tst_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_TST,1, 0,Rn,Rm,sh,Rs)
#define orc_arm_emit_teq_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,sh,Rs)
#define orc_arm_emit_cmp_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,sh,Rs)
#define orc_arm_emit_cmn_rsr(p,cond,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,sh,Rs)
#define orc_arm_emit_orr_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_mov_rsr(p,cond,S,Rd,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,sh,Rs)
#define orc_arm_emit_bic_rsr(p,cond,S,Rd,Rn,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,sh,Rs)
#define orc_arm_emit_mvn_rsr(p,cond,S,Rd,Rm,sh,Rs) orc_arm_emit_dp(p,3,c
ond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,sh,Rs)
/* <op>{<cond>}{s} {<Rd>,} <Rn>, <Rm>, RRX */
#define orc_arm_emit_and_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_AND,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_eor_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_EOR,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_sub_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_SUB,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_rsb_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_RSB,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_add_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_ADD,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_adc_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_ADC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_sbc_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_SBC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_rsc_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_RSC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_tst_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_TST,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_teq_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_TEQ,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_cmp_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_CMP,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_cmn_rrx(p,cond,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_CMN,1, 0,Rn,Rm,0,0)
#define orc_arm_emit_orr_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_ORR,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_mov_rrx(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_MOV,S,Rd, 0,Rm,0,0)
#define orc_arm_emit_bic_rrx(p,cond,S,Rd,Rn,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_BIC,S,Rd,Rn,Rm,0,0)
#define orc_arm_emit_mvn_rrx(p,cond,S,Rd,Rm) orc_arm_emit_dp(p,4,c
ond,ORC_ARM_DP_MVN,S,Rd, 0,Rm,0,0)
/* parallel instructions */
#define orc_arm_emit_sadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,
0,cond,Rd,Rn,Rm)
#define orc_arm_emit_qadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,
1,cond,Rd,Rn,Rm)
#define orc_arm_emit_shadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,
2,cond,Rd,Rn,Rm)
#define orc_arm_emit_uadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,
3,cond,Rd,Rn,Rm)
#define orc_arm_emit_uqadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,
4,cond,Rd,Rn,Rm)
#define orc_arm_emit_uhadd16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,0,
5,cond,Rd,Rn,Rm)
#define orc_arm_emit_saddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,
0,cond,Rd,Rn,Rm)
#define orc_arm_emit_qaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,
1,cond,Rd,Rn,Rm)
#define orc_arm_emit_shaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,
2,cond,Rd,Rn,Rm)
#define orc_arm_emit_uaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,
3,cond,Rd,Rn,Rm)
#define orc_arm_emit_uqaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,
4,cond,Rd,Rn,Rm)
#define orc_arm_emit_uhaddsubx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,1,
5,cond,Rd,Rn,Rm)
#define orc_arm_emit_ssubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,
0,cond,Rd,Rn,Rm)
#define orc_arm_emit_qsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,
1,cond,Rd,Rn,Rm)
#define orc_arm_emit_shsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,
2,cond,Rd,Rn,Rm)
#define orc_arm_emit_usubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,
3,cond,Rd,Rn,Rm)
#define orc_arm_emit_uqsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,
4,cond,Rd,Rn,Rm)
#define orc_arm_emit_uhsubaddx(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,2,
5,cond,Rd,Rn,Rm)
#define orc_arm_emit_ssub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,
0,cond,Rd,Rn,Rm)
#define orc_arm_emit_qsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,
1,cond,Rd,Rn,Rm)
#define orc_arm_emit_shsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,
2,cond,Rd,Rn,Rm)
#define orc_arm_emit_usub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,
3,cond,Rd,Rn,Rm)
#define orc_arm_emit_uqsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,
4,cond,Rd,Rn,Rm)
#define orc_arm_emit_uhsub16(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,3,
5,cond,Rd,Rn,Rm)
#define orc_arm_emit_sadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,
0,cond,Rd,Rn,Rm)
#define orc_arm_emit_qadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,
1,cond,Rd,Rn,Rm)
#define orc_arm_emit_shadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,
2,cond,Rd,Rn,Rm)
#define orc_arm_emit_uadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,
3,cond,Rd,Rn,Rm)
#define orc_arm_emit_uqadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,
4,cond,Rd,Rn,Rm)
#define orc_arm_emit_uhadd8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,4,
5,cond,Rd,Rn,Rm)
#define orc_arm_emit_ssub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,
0,cond,Rd,Rn,Rm)
#define orc_arm_emit_qsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,
1,cond,Rd,Rn,Rm)
#define orc_arm_emit_shsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,
2,cond,Rd,Rn,Rm)
#define orc_arm_emit_usub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,
3,cond,Rd,Rn,Rm)
#define orc_arm_emit_uqsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,
4,cond,Rd,Rn,Rm)
#define orc_arm_emit_uhsub8(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,5,
5,cond,Rd,Rn,Rm)
/* selection */
#define orc_arm_emit_sel(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,6,
6,cond,Rd,Rn,Rm)
/* saturating add */
#define orc_arm_emit_qadd(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,7,
7, cond,Rd,Rn,Rm)
#define orc_arm_emit_qsub(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,8,
8, cond,Rd,Rn,Rm)
#define orc_arm_emit_qdadd(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,7,
9, cond,Rd,Rn,Rm)
#define orc_arm_emit_qdsub(p,cond,Rd,Rn,Rm) orc_arm_emit_par(p,8,
10,cond,Rd,Rn,Rm)
/* extend instructions */
/* with ROR #r8, r8 should be a multiple of 8 */
#define orc_arm_emit_sxtb16_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,0,
cond,Rd,15,Rm,r8)
#define orc_arm_emit_sxtb_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,1,
cond,Rd,15,Rm,r8)
#define orc_arm_emit_sxth_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,2,
cond,Rd,15,Rm,r8)
#define orc_arm_emit_uxtb16_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,3,
cond,Rd,15,Rm,r8)
#define orc_arm_emit_uxtb_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,4,
cond,Rd,15,Rm,r8)
#define orc_arm_emit_uxth_r8(p,cond,Rd,Rm,r8) orc_arm_emit_xt(p,5,
cond,Rd,15,Rm,r8)
#define orc_arm_emit_sxtab16_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,6,
cond,Rd,Rn,Rm,r8)
#define orc_arm_emit_sxtab_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,7,
cond,Rd,Rn,Rm,r8)
#define orc_arm_emit_sxtah_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,8,
cond,Rd,Rn,Rm,r8)
#define orc_arm_emit_uxtab16_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,9,
cond,Rd,Rn,Rm,r8)
#define orc_arm_emit_uxtab_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,10,
cond,Rd,Rn,Rm,r8)
#define orc_arm_emit_uxtah_r8(p,cond,Rd,Rn,Rm,r8) orc_arm_emit_xt(p,11,
cond,Rd,Rn,Rm,r8)
/* with out rotate */
#define orc_arm_emit_sxtb16(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_sxtb(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_sxth(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_uxtb16(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_uxtb(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_uxth(p,cond,Rd,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_sxtab16(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_sxtab(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_sxtah(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_uxtab16(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_uxtab(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
#define orc_arm_emit_uxtah(p,cond,Rd,Rn,Rm) orc_arm_emit_sxtb_r8(
p,cond,Rd,Rm,0)
/* misc instructions */
/* packing */
#define orc_arm_emit_pkhbt(p,cond,Rd,Rn,Rm) orc_arm_emit_pkh(p,0,
cond,Rd,Rn,Rm,0)
#define orc_arm_emit_pkhtb(p,cond,Rd,Rn,Rm) orc_arm_emit_pkh(p,1,
cond,Rd,Rn,Rm,0)
/* with [LSL|ASR] #imm */
#define orc_arm_emit_pkhbt_s(p,cond,Rd,Rn,Rm,lsl) orc_arm_emit_pkh(p,0,
cond,Rd,Rn,Rm,lsl)
#define orc_arm_emit_pkhtb_s(p,cond,Rd,Rn,Rm,asr) orc_arm_emit_pkh(p,1,
cond,Rd,Rn,Rm,asr)
/* saturation */
#define orc_arm_emit_ssat(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,0,
cond,Rd,sat,Rm,0, 0)
#define orc_arm_emit_usat(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,1,
cond,Rd,sat,Rm,0, 0)
#define orc_arm_emit_ssat_lsl(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,0,
cond,Rd,sat,Rm,sh,0)
#define orc_arm_emit_usat_lsl(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,1,
cond,Rd,sat,Rm,sh,0)
#define orc_arm_emit_ssat_asr(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,0,
cond,Rd,sat,Rm,sh,1)
#define orc_arm_emit_usat_asr(p,cond,Rd,sat,Rm,sh) orc_arm_emit_sat(p,1,
cond,Rd,sat,Rm,sh,1)
#define orc_arm_emit_ssat16(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,2,
cond,Rd,sat,Rm,0, 0)
#define orc_arm_emit_usat16(p,cond,Rd,sat,Rm) orc_arm_emit_sat(p,3,
cond,Rd,sat,Rm,0, 0)
/* reversing */
#define orc_arm_emit_rev(p,cond,Rd,Rm) orc_arm_emit_rv (p,0,
cond,Rd,Rm)
#define orc_arm_emit_rev16(p,cond,Rd,Rm) orc_arm_emit_rv (p,1,
cond,Rd,Rm)
#endif #endif
 End of changes. 11 change blocks. 
6 lines changed or deleted 389 lines changed or added


 orcmmx.h   orcmmx.h 
skipping to change at line 60 skipping to change at line 60
int src, int dest); int src, int dest);
void orc_mmx_emit_f30f (OrcCompiler *p, const char *insn_name, int code, void orc_mmx_emit_f30f (OrcCompiler *p, const char *insn_name, int code,
int src, int dest); int src, int dest);
void orc_mmx_emit_0f (OrcCompiler *p, const char *insn_name, int code, void orc_mmx_emit_0f (OrcCompiler *p, const char *insn_name, int code,
int src, int dest); int src, int dest);
void orc_mmx_emit_pshufw (OrcCompiler *p, int shuf, int src, int dest); void orc_mmx_emit_pshufw (OrcCompiler *p, int shuf, int src, int dest);
void orc_mmx_emit_shiftimm (OrcCompiler *p, const char *insn_name, void orc_mmx_emit_shiftimm (OrcCompiler *p, const char *insn_name,
int code, int modrm_code, int shift, int reg); int code, int modrm_code, int shift, int reg);
unsigned int orc_mmx_get_cpu_flags (void); unsigned int orc_mmx_get_cpu_flags (void);
/* MMX instructions */
#define orc_mmx_emit_punpcklbw(p,a,b) orc_mmx_emit_660f (p, "punpcklbw", 0
x60, a, b)
#define orc_mmx_emit_punpcklwd(p,a,b) orc_mmx_emit_660f (p, "punpcklwd", 0
x61, a, b)
#define orc_mmx_emit_punpckldq(p,a,b) orc_mmx_emit_660f (p, "punpckldq", 0
x62, a, b)
#define orc_mmx_emit_packsswb(p,a,b) orc_mmx_emit_660f (p, "packsswb", 0x
63, a, b)
#define orc_mmx_emit_pcmpgtb(p,a,b) orc_mmx_emit_660f (p, "pcmpgtb", 0x6
4, a, b)
#define orc_mmx_emit_pcmpgtw(p,a,b) orc_mmx_emit_660f (p, "pcmpgtw", 0x6
5, a, b)
#define orc_mmx_emit_pcmpgtd(p,a,b) orc_mmx_emit_660f (p, "pcmpgtd", 0x6
6, a, b)
#define orc_mmx_emit_packuswb(p,a,b) orc_mmx_emit_660f (p, "packuswb", 0x
67, a, b)
#define orc_mmx_emit_punpckhbw(p,a,b) orc_mmx_emit_660f (p, "punpckhbw", 0
x68, a, b)
#define orc_mmx_emit_punpckhwd(p,a,b) orc_mmx_emit_660f (p, "punpckhwd", 0
x69, a, b)
#define orc_mmx_emit_punpckhdq(p,a,b) orc_mmx_emit_660f (p, "punpckhdq", 0
x6a, a, b)
#define orc_mmx_emit_packssdw(p,a,b) orc_mmx_emit_660f (p, "packssdw", 0x
6b, a, b)
#define orc_mmx_emit_movq(p,a,b) orc_mmx_emit_660f (p, "movq", 0x6f,
a, b)
#define orc_mmx_emit_psraw(p,a,b) orc_mmx_emit_shiftimm (p, "psraw", 0
x71, 4, a, b)
#define orc_mmx_emit_psrlw(p,a,b) orc_mmx_emit_shiftimm (p, "psrlw", 0
x71, 2, a, b)
#define orc_mmx_emit_psllw(p,a,b) orc_mmx_emit_shiftimm (p, "psllw", 0
x71, 6, a, b)
#define orc_mmx_emit_psrad(p,a,b) orc_mmx_emit_shiftimm (p, "psrad", 0
x72, 4, a, b)
#define orc_mmx_emit_psrld(p,a,b) orc_mmx_emit_shiftimm (p, "psrld", 0
x72, 2, a, b)
#define orc_mmx_emit_pslld(p,a,b) orc_mmx_emit_shiftimm (p, "pslld", 0
x72, 6, a, b)
#define orc_mmx_emit_psrlq(p,a,b) orc_mmx_emit_shiftimm (p, "psrlq", 0
x73, 2, a, b)
#define orc_mmx_emit_psllq(p,a,b) orc_mmx_emit_shiftimm (p, "psllq", 0
x73, 6, a, b)
#define orc_mmx_emit_pcmpeqb(p,a,b) orc_mmx_emit_660f (p, "pcmpeqb", 0x7
4, a, b)
#define orc_mmx_emit_pcmpeqw(p,a,b) orc_mmx_emit_660f (p, "pcmpeqw", 0x7
5, a, b)
#define orc_mmx_emit_pcmpeqd(p,a,b) orc_mmx_emit_660f (p, "pcmpeqd", 0x7
6, a, b)
#define orc_mmx_emit_emms(p) orc_x86_emit_emms (p)
#define orc_mmx_emit_pmullw(p,a,b) orc_mmx_emit_660f (p, "pmullw", 0xd5
, a, b)
#define orc_mmx_emit_psubusb(p,a,b) orc_mmx_emit_660f (p, "psubusb", 0xd
8, a, b)
#define orc_mmx_emit_psubusw(p,a,b) orc_mmx_emit_660f (p, "psubusw", 0xd
9, a, b)
#define orc_mmx_emit_pand(p,a,b) orc_mmx_emit_660f (p, "pand", 0xdb,
a, b)
#define orc_mmx_emit_paddusb(p,a,b) orc_mmx_emit_660f (p, "paddusb", 0xd
c, a, b)
#define orc_mmx_emit_paddusw(p,a,b) orc_mmx_emit_660f (p, "paddusw", 0xd
d, a, b)
#define orc_mmx_emit_pandn(p,a,b) orc_mmx_emit_660f (p, "pandn", 0xdf,
a, b)
#define orc_mmx_emit_pmulhw(p,a,b) orc_mmx_emit_660f (p, "pmulhw", 0xe5
, a, b)
#define orc_mmx_emit_psubsb(p,a,b) orc_mmx_emit_660f (p, "psubsb", 0xe8
, a, b)
#define orc_mmx_emit_psubsw(p,a,b) orc_mmx_emit_660f (p, "psubsw", 0xe9
, a, b)
#define orc_mmx_emit_por(p,a,b) orc_mmx_emit_660f (p, "por", 0xeb, a
, b)
#define orc_mmx_emit_paddsb(p,a,b) orc_mmx_emit_660f (p, "paddsb", 0xec
, a, b)
#define orc_mmx_emit_paddsw(p,a,b) orc_mmx_emit_660f (p, "paddsw", 0xed
, a, b)
#define orc_mmx_emit_pxor(p,a,b) orc_mmx_emit_660f (p, "pxor", 0xef,
a, b)
#define orc_mmx_emit_pmaddwd(p,a,b) orc_mmx_emit_660f (p, "pmaddwd", 0xf
5, a, b)
#define orc_mmx_emit_psubb(p,a,b) orc_mmx_emit_660f (p, "psubb", 0xf8,
a, b)
#define orc_mmx_emit_psubw(p,a,b) orc_mmx_emit_660f (p, "psubw", 0xf9,
a, b)
#define orc_mmx_emit_psubd(p,a,b) orc_mmx_emit_660f (p, "psubd", 0xfa,
a, b)
#define orc_mmx_emit_paddb(p,a,b) orc_mmx_emit_660f (p, "paddb", 0xfc,
a, b)
#define orc_mmx_emit_paddw(p,a,b) orc_mmx_emit_660f (p, "paddw", 0xfd,
a, b)
#define orc_mmx_emit_paddd(p,a,b) orc_mmx_emit_660f (p, "paddd", 0xfe,
a, b)
/* MMX EXT instructions */
/* MMX SSE instructions */
#define orc_mmx_emit_pinsrw(p,a,b) orc_mmx_emit_660f (p, "pinsrw", 0xc4
, a, b)
#define orc_mmx_emit_pextrw(p,a,b) orc_mmx_emit_660f (p, "pextrw", 0xc5
, a, b)
#define orc_mmx_emit_pminub(p,a,b) orc_mmx_emit_660f (p, "pminub", 0xda
, a, b)
#define orc_mmx_emit_pmaxub(p,a,b) orc_mmx_emit_660f (p, "pmaxub", 0xde
, a, b)
#define orc_mmx_emit_pavgb(p,a,b) orc_mmx_emit_660f (p, "pavgb", 0xe0,
a, b)
#define orc_mmx_emit_pavgw(p,a,b) orc_mmx_emit_660f (p, "pavgw", 0xe3,
a, b)
#define orc_mmx_emit_pmulhuw(p,a,b) orc_mmx_emit_660f (p, "pmulhuw", 0xe
4, a, b)
#define orc_mmx_emit_pminsw(p,a,b) orc_mmx_emit_660f (p, "pminsw", 0xea
, a, b)
#define orc_mmx_emit_pmaxsw(p,a,b) orc_mmx_emit_660f (p, "pmaxsw", 0xee
, a, b)
#define orc_mmx_emit_psadbw(p,a,b) orc_mmx_emit_660f (p, "psadbw", 0xf6
, a, b)
/* 3DNow! instrunctions, FIXME, not correct */
#define orc_mmx_emit_pmulhrw(p,a,b) orc_mmx_emit_660f (p, "pmulhrw", 0xb
7, a, b)
#define orc_mmx_emit_pavgusb(p,a,b) orc_mmx_emit_660f (p, "pavgusb", 0xb
f, a, b)
/* MMX SSE2 instructions */
#define orc_mmx_emit_paddq(p,a,b) orc_mmx_emit_660f (p, "paddq", 0xd4,
a, b)
#define orc_mmx_emit_psubq(p,a,b) orc_mmx_emit_660f (p, "psubq", 0xfb,
a, b)
#define orc_mmx_emit_pmuludq(p,a,b) orc_mmx_emit_660f (p, "pmuludq", 0xf
4, a, b)
/* MMX SSE3 instructions */
/* MMX SSSE3 instructions */
#define orc_mmx_emit_pshufb(p,a,b) orc_mmx_emit_660f (p, "pshufb", 0x38
00, a, b)
#define orc_mmx_emit_phaddw(p,a,b) orc_mmx_emit_660f (p, "phaddw", 0x38
01, a, b)
#define orc_mmx_emit_phaddd(p,a,b) orc_mmx_emit_660f (p, "phaddd", 0x38
02, a, b)
#define orc_mmx_emit_phaddsw(p,a,b) orc_mmx_emit_660f (p, "phaddsw", 0x3
803, a, b)
#define orc_mmx_emit_pmaddubsw(p,a,b) orc_mmx_emit_660f (p, "pmaddubsw", 0
x3804, a, b)
#define orc_mmx_emit_phsubw(p,a,b) orc_mmx_emit_660f (p, "phsubw", 0x38
05, a, b)
#define orc_mmx_emit_phsubd(p,a,b) orc_mmx_emit_660f (p, "phsubd", 0x38
06, a, b)
#define orc_mmx_emit_phsubsw(p,a,b) orc_mmx_emit_660f (p, "phsubsw", 0x3
807, a, b)
#define orc_mmx_emit_psignb(p,a,b) orc_mmx_emit_660f (p, "psignb", 0x38
08, a, b)
#define orc_mmx_emit_psignw(p,a,b) orc_mmx_emit_660f (p, "psignw", 0x38
09, a, b)
#define orc_mmx_emit_psignd(p,a,b) orc_mmx_emit_660f (p, "psignd", 0x38
0a, a, b)
#define orc_mmx_emit_pmulhrsw(p,a,b) orc_mmx_emit_660f (p, "pmulhrsw", 0x
380b, a, b)
#define orc_mmx_emit_pabsb(p,a,b) orc_mmx_emit_660f (p, "pabsb", 0x381
c, a, b)
#define orc_mmx_emit_pabsw(p,a,b) orc_mmx_emit_660f (p, "pabsw", 0x381
d, a, b)
#define orc_mmx_emit_pabsd(p,a,b) orc_mmx_emit_660f (p, "pabsd", 0x381
e, a, b)
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 177 lines changed or added


 orcpowerpc.h   orcpowerpc.h 
skipping to change at line 100 skipping to change at line 100
void powerpc_flush (OrcCompiler *compiler); void powerpc_flush (OrcCompiler *compiler);
void powerpc_emit_srawi (OrcCompiler *compiler, int regd, int rega, int shi ft, void powerpc_emit_srawi (OrcCompiler *compiler, int regd, int rega, int shi ft,
int record); int record);
void powerpc_emit_655510 (OrcCompiler *compiler, int major, int d, int a, void powerpc_emit_655510 (OrcCompiler *compiler, int major, int d, int a,
int b, int minor); int b, int minor);
void powerpc_emit_X (OrcCompiler *compiler, unsigned int insn, int d, int a , void powerpc_emit_X (OrcCompiler *compiler, unsigned int insn, int d, int a ,
int b); int b);
void powerpc_emit_VA (OrcCompiler *compiler, int major, int d, int a, int b , void powerpc_emit_VA (OrcCompiler *compiler, int major, int d, int a, int b ,
int c, int minor); int c, int minor);
void powerpc_emit_VA_2 (OrcCompiler *compiler, const char *name, int major,
int d,
int a, int b, int c, int minor);
void powerpc_emit_VX (OrcCompiler *compiler, unsigned int insn, int d, int a, void powerpc_emit_VX (OrcCompiler *compiler, unsigned int insn, int d, int a,
int b); int b);
void powerpc_emit_VX_2 (OrcCompiler *p, const char *name, unsigned int insn , void powerpc_emit_VX_2 (OrcCompiler *p, const char *name, unsigned int insn ,
int d, int a, int b); int d, int a, int b);
void powerpc_emit_VX_3 (OrcCompiler *p, const char *name, unsigned int insn
,
int d, int a, int b, int c);
void powerpc_emit_VX_4 (OrcCompiler *p, const char *name, unsigned int insn
,
int d, int a);
int powerpc_get_constant (OrcCompiler *p, int type, int value); int powerpc_get_constant (OrcCompiler *p, int type, int value);
/* instructions */
#define powerpc_emit_vandc(p,a,b,c) powerpc_emit_VX_2 (p, "vandc", 0
x10000444, a, b, c)
#define powerpc_emit_vor(p,a,b,c) powerpc_emit_VX_2 (p, "vor", 0x1
0000484, a, b, c)
#define powerpc_emit_vxor(p,a,b,c) powerpc_emit_VX_2 (p, "vxor", 0x
100004c4, a, b, c)
#define powerpc_emit_vmulesb(p,a,b,c) powerpc_emit_VX_2 (p, "vmulesb",
0x10000308, a, b, c)
#define powerpc_emit_vmuleub(p,a,b,c) powerpc_emit_VX_2 (p, "vmuleub",
0x10000208, a, b, c)
#define powerpc_emit_vmulesh(p,a,b,c) powerpc_emit_VX_2 (p, "vmulesh",
0x10000348, a, b, c)
#define powerpc_emit_vmuleuh(p,a,b,c) powerpc_emit_VX_2 (p, "vmuleuh",
0x10000248, a, b, c)
#define powerpc_emit_vmrghb(p,a,b,c) powerpc_emit_VX_2 (p, "vmrghb",
0x1000000c, a, b, c)
#define powerpc_emit_vmrghh(p,a,b,c) powerpc_emit_VX_2 (p, "vmrghh",
0x1000004c, a, b, c)
#define powerpc_emit_vpkshss(p,a,b,c) powerpc_emit_VX_2 (p, "vpkshss",
0x1000018e, a, b, c)
#define powerpc_emit_vpkshus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkshus",
0x1000010e, a, b, c)
#define powerpc_emit_vpkswss(p,a,b,c) powerpc_emit_VX_2 (p, "vpkswss",
0x100001ce, a, b, c)
#define powerpc_emit_vpkswus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkswus",
0x1000014e, a, b, c)
#define powerpc_emit_vpkuhus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuhus",
0x1000008e, a, b, c)
#define powerpc_emit_vpkuhum(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuhum",
0x1000000e, a, b, c)
#define powerpc_emit_vpkuwus(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuwus",
0x100000ce, a, b, c)
#define powerpc_emit_vpkuwum(p,a,b,c) powerpc_emit_VX_2 (p, "vpkuwum",
0x1000004e, a, b, c)
#define powerpc_emit_vadduhm(p,a,b,c) powerpc_emit_VX_2 (p, "vadduhm",
0x10000040, a, b, c)
#define powerpc_emit_vadduwm(p,a,b,c) powerpc_emit_VX_2 (p, "vadduwm",
0x10000080, a, b, c)
#define powerpc_emit_vsububm(p,a,b,c) powerpc_emit_VX_2 (p, "vsububm",
0x10000400, a, b, c)
#define powerpc_emit_vsum4ubs(p,a,b,c) powerpc_emit_VX_2 (p, "vsum4ubs"
, 0x10000608, a, b, c)
#define powerpc_emit_vmaxub(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxub",
0x10000002, a, b, c)
#define powerpc_emit_vmaxsb(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxsb",
0x10000102, a, b, c)
#define powerpc_emit_vmaxsh(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxsh",
0x10000142, a, b, c)
#define powerpc_emit_vmaxsw(p,a,b,c) powerpc_emit_VX_2 (p, "vmaxsw",
0x10000182, a, b, c)
#define powerpc_emit_vminub(p,a,b,c) powerpc_emit_VX_2 (p, "vminub",
0x10000202, a, b, c)
#define powerpc_emit_vminsb(p,a,b,c) powerpc_emit_VX_2 (p, "vminsb",
0x10000302, a, b, c)
#define powerpc_emit_vminsh(p,a,b,c) powerpc_emit_VX_2 (p, "vminsh",
0x10000342, a, b, c)
#define powerpc_emit_vminsw(p,a,b,c) powerpc_emit_VX_2 (p, "vminsw",
0x10000382, a, b, c)
#define powerpc_emit_vsldoi(p,a,b,c,d) powerpc_emit_VX_3 (p, "vsldoi",
0x1000002c | (d<<6), a, b, c, d)
#define powerpc_emit_vmladduhm(p,a,b,c,d) powerpc_emit_VA_2 (p, "vmladduhm
", 4, a, b, c, d, 34)
#define powerpc_emit_vupkhsb(p,a,b) powerpc_emit_VX_4 (p, "vupkhsb",
0x1000020e, a, b)
#define powerpc_emit_vupkhsh(p,a,b) powerpc_emit_VX_4 (p, "vupkhsh",
0x1000024e, a, b)
#define powerpc_emit_vperm(p,a,b,c,d) powerpc_emit_VX_3 (p, "vperm", 0
x1000002b, a, b, c, d)
#endif #endif
 End of changes. 3 change blocks. 
0 lines changed or deleted 89 lines changed or added


 orcprogram.h   orcprogram.h 
#ifndef _ORC_PROGRAM_H_ #ifndef _ORC_PROGRAM_H_
#define _ORC_PROGRAM_H_ #define _ORC_PROGRAM_H_
#include <orc/orc-stdint.h> #include <orc/orc-stdint.h>
#include <orc/orcutils.h> #include <orc/orcutils.h>
typedef struct _OrcOpcodeExecutor OrcOpcodeExecutor; typedef struct _OrcOpcodeExecutor OrcOpcodeExecutor;
typedef struct _OrcExecutor OrcExecutor; typedef struct _OrcExecutor OrcExecutor;
typedef struct _OrcExecutorAlt OrcExecutorAlt;
typedef struct _OrcVariable OrcVariable; typedef struct _OrcVariable OrcVariable;
typedef struct _OrcOpcodeSet OrcOpcodeSet; typedef struct _OrcOpcodeSet OrcOpcodeSet;
typedef struct _OrcStaticOpcode OrcStaticOpcode; typedef struct _OrcStaticOpcode OrcStaticOpcode;
typedef struct _OrcInstruction OrcInstruction; typedef struct _OrcInstruction OrcInstruction;
typedef struct _OrcProgram OrcProgram; typedef struct _OrcProgram OrcProgram;
typedef struct _OrcCompiler OrcCompiler; typedef struct _OrcCompiler OrcCompiler;
typedef struct _OrcRule OrcRule; typedef struct _OrcRule OrcRule;
typedef struct _OrcRuleSet OrcRuleSet; typedef struct _OrcRuleSet OrcRuleSet;
typedef struct _OrcConstant OrcConstant; typedef struct _OrcConstant OrcConstant;
typedef struct _OrcFixup OrcFixup; typedef struct _OrcFixup OrcFixup;
typedef struct _OrcTarget OrcTarget; typedef struct _OrcTarget OrcTarget;
typedef void (*OrcOpcodeEmulateFunc)(OrcOpcodeExecutor *ex, void *user); typedef void (*OrcOpcodeEmulateFunc)(OrcOpcodeExecutor *ex, void *user);
typedef void (*OrcRuleEmitFunc)(OrcCompiler *p, void *user, OrcInstruction *insn); typedef void (*OrcRuleEmitFunc)(OrcCompiler *p, void *user, OrcInstruction *insn);
typedef void (*OrcExecutorFunc)(OrcExecutor *ex); typedef void (*OrcExecutorFunc)(OrcExecutor *ex);
#define ORC_N_REGS (32*4) #define ORC_N_REGS (32*4)
#define ORC_N_INSNS 100 #define ORC_N_INSNS 100
#define ORC_N_VARIABLES 64 #define ORC_N_VARIABLES 64
#define ORC_N_ARRAYS 12
#define ORC_N_REGISTERS 20 #define ORC_N_REGISTERS 20
#define ORC_N_FIXUPS 20 #define ORC_N_FIXUPS 20
#define ORC_N_CONSTANTS 20 #define ORC_N_CONSTANTS 20
#define ORC_N_LABELS 20 #define ORC_N_LABELS 20
#define ORC_GP_REG_BASE 32 #define ORC_GP_REG_BASE 32
#define ORC_VEC_REG_BASE 64 #define ORC_VEC_REG_BASE 64
#define ORC_STATIC_OPCODE_N_SRC 4 #define ORC_STATIC_OPCODE_N_SRC 4
#define ORC_STATIC_OPCODE_N_DEST 2 #define ORC_STATIC_OPCODE_N_DEST 2
skipping to change at line 74 skipping to change at line 76
} while (0) } while (0)
#define ORC_COMPILER_ERROR(compiler, ...) do { \ #define ORC_COMPILER_ERROR(compiler, ...) do { \
compiler->error = TRUE; \ compiler->error = TRUE; \
compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; \ compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; \
orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA _ARGS__); \ orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA _ARGS__); \
} while (0) } while (0)
enum { enum {
ORC_TARGET_C_C99 = (1<<0), ORC_TARGET_C_C99 = (1<<0),
ORC_TARGET_C_BARE = (1<<1) ORC_TARGET_C_BARE = (1<<1),
ORC_TARGET_C_NOEXEC = (1<<2)
}; };
enum { enum {
ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0) ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0)
}; };
typedef enum { typedef enum {
ORC_VAR_TYPE_TEMP, ORC_VAR_TYPE_TEMP,
ORC_VAR_TYPE_SRC, ORC_VAR_TYPE_SRC,
ORC_VAR_TYPE_DEST, ORC_VAR_TYPE_DEST,
skipping to change at line 147 skipping to change at line 150
ORC_VAR_T15 ORC_VAR_T15
}; };
enum { enum {
ORC_CONST_ZERO, ORC_CONST_ZERO,
ORC_CONST_SPLAT_B, ORC_CONST_SPLAT_B,
ORC_CONST_SPLAT_W, ORC_CONST_SPLAT_W,
ORC_CONST_SPLAT_L, ORC_CONST_SPLAT_L,
}; };
enum {
ORC_SAMPLE_REGULAR = 0,
ORC_SAMPLE_TRANSPOSED,
ORC_SAMPLE_NEAREST,
ORC_SAMPLE_BILINEAR,
ORC_SAMPLE_FOUR_TAP
};
typedef enum { typedef enum {
ORC_COMPILE_RESULT_OK = 0, ORC_COMPILE_RESULT_OK = 0,
ORC_COMPILE_RESULT_UNKNOWN_COMPILE = 0x100, ORC_COMPILE_RESULT_UNKNOWN_COMPILE = 0x100,
ORC_COMPILE_RESULT_MISSING_RULE = 0x101, ORC_COMPILE_RESULT_MISSING_RULE = 0x101,
ORC_COMPILE_RESULT_UNKNOWN_PARSE = 0x200, ORC_COMPILE_RESULT_UNKNOWN_PARSE = 0x200,
ORC_COMPILE_RESULT_PARSE = 0x201, ORC_COMPILE_RESULT_PARSE = 0x201,
ORC_COMPILE_RESULT_VARIABLE = 0x202 ORC_COMPILE_RESULT_VARIABLE = 0x202
skipping to change at line 192 skipping to change at line 203
int is_chained; int is_chained;
int is_aligned; int is_aligned;
int is_uncached; int is_uncached;
int value; int value;
int ptr_register; int ptr_register;
int ptr_offset; int ptr_offset;
int mask_alloc; int mask_alloc;
int aligned_data; int aligned_data;
int sampling_type;
int load_dest;
}; };
/** /**
* OrcRule: * OrcRule:
* *
* The OrcRule structure has no public members * The OrcRule structure has no public members
*/ */
struct _OrcRule { struct _OrcRule {
/*< private >*/ /*< private >*/
OrcRuleEmitFunc emit; OrcRuleEmitFunc emit;
void *emit_user; void *emit_user;
}; };
/** /**
* OrcRuleSet: * OrcRuleSet:
* *
* The OrcRuleSet structure has no public members * The OrcRuleSet structure has no public members
*/ */
struct _OrcRuleSet { struct _OrcRuleSet {
/*< private >*/ /*< private >*/
OrcOpcodeSet *opcode_set; int opcode_major;
int required_target_flags; int required_target_flags;
OrcRule *rules; OrcRule *rules;
int n_rules; int n_rules;
}; };
/** /**
* OrcOpcodeSet: * OrcOpcodeSet:
* *
* The OrcOpcodeSet structure has no public members * The OrcOpcodeSet structure has no public members
*/ */
struct _OrcOpcodeSet { struct _OrcOpcodeSet {
/*< private >*/ /*< private >*/
int opcode_major; int opcode_major;
char prefix[8]; char prefix[8];
int n_opcodes; int n_opcodes;
OrcStaticOpcode *opcodes; OrcStaticOpcode *opcodes;
}; };
#define ORC_STATIC_OPCODE_ACCUMULATOR 1 #define ORC_STATIC_OPCODE_ACCUMULATOR (1<<0)
#define ORC_STATIC_OPCODE_FLOAT_SRC (1<<1)
#define ORC_STATIC_OPCODE_FLOAT_DEST (1<<2)
#define ORC_STATIC_OPCODE_FLOAT (ORC_STATIC_OPCODE_FLOAT_SRC|ORC_STATIC_OPC
ODE_FLOAT_DEST)
struct _OrcStaticOpcode { struct _OrcStaticOpcode {
char name[16]; char name[16];
OrcOpcodeEmulateFunc emulate; OrcOpcodeEmulateFunc emulate;
void *emulate_user; void *emulate_user;
unsigned int flags; unsigned int flags;
int dest_size[ORC_STATIC_OPCODE_N_DEST]; int dest_size[ORC_STATIC_OPCODE_N_DEST];
int src_size[ORC_STATIC_OPCODE_N_SRC]; int src_size[ORC_STATIC_OPCODE_N_SRC];
}; };
skipping to change at line 269 skipping to change at line 285
* OrcConstant: * OrcConstant:
* *
* The OrcConstant structure has no public members * The OrcConstant structure has no public members
*/ */
struct _OrcConstant { struct _OrcConstant {
/*< private >*/ /*< private >*/
int type; int type;
int alloc_reg; int alloc_reg;
unsigned int value; unsigned int value;
unsigned int full_value[4]; unsigned int full_value[4];
int use_count;
}; };
/** /**
* OrcFixup: * OrcFixup:
* *
* The OrcFixup structure has no public members * The OrcFixup structure has no public members
*/ */
struct _OrcFixup { struct _OrcFixup {
/*< private >*/ /*< private >*/
unsigned char *ptr; unsigned char *ptr;
skipping to change at line 309 skipping to change at line 326
int n_accum_vars; int n_accum_vars;
char *name; char *name;
char *asm_code; char *asm_code;
unsigned char *code; unsigned char *code;
void *code_exec; void *code_exec;
int code_size; int code_size;
void *backup_func; void *backup_func;
int is_2d;
int constant_n;
int constant_m;
}; };
/** /**
* OrcCompiler: * OrcCompiler:
* *
* The OrcCompiler structure has no public members * The OrcCompiler structure has no public members
*/ */
struct _OrcCompiler { struct _OrcCompiler {
/*< private >*/ /*< private >*/
OrcProgram *program; OrcProgram *program;
OrcTarget *target; OrcTarget *target;
unsigned int target_flags; unsigned int target_flags;
OrcInstruction insns[ORC_N_INSNS]; OrcInstruction insns[ORC_N_INSNS];
int n_insns; int n_insns;
OrcVariable vars[ORC_N_VARIABLES]; OrcVariable vars[ORC_N_VARIABLES];
int n_temp_vars; int n_temp_vars;
int n_dup_vars;
unsigned char *codeptr; unsigned char *codeptr;
OrcConstant constants[ORC_N_CONSTANTS]; OrcConstant constants[ORC_N_CONSTANTS];
int n_constants; int n_constants;
OrcFixup fixups[ORC_N_FIXUPS]; OrcFixup fixups[ORC_N_FIXUPS];
int n_fixups; int n_fixups;
unsigned char *labels[ORC_N_LABELS]; unsigned char *labels[ORC_N_LABELS];
int n_labels; int n_labels;
skipping to change at line 362 skipping to change at line 383
int asm_code_len; int asm_code_len;
int is_64bit; int is_64bit;
int tmpreg; int tmpreg;
int exec_reg; int exec_reg;
int gp_tmpreg; int gp_tmpreg;
int need_mask_regs; int need_mask_regs;
}; };
#define ORC_SRC_ARG(p,i,n) ((p)->vars[(i)->src_args[(n)]].alloc)
#define ORC_DEST_ARG(p,i,n) ((p)->vars[(i)->dest_args[(n)]].alloc)
#define ORC_SRC_TYPE(p,i,n) ((p)->vars[(i)->src_args[(n)]].vartype)
#define ORC_DEST_TYPE(p,i,n) ((p)->vars[(i)->dest_args[(n)]].vartype)
#define ORC_SRC_VAL(p,i,n) ((p)->vars[(i)->src_args[(n)]].value)
#define ORC_DEST_VAL(p,i,n) ((p)->vars[(i)->dest_args[(n)]].value)
/** /**
* OrcOpcodeExecutor: * OrcOpcodeExecutor:
* *
* The OrcOpcodeExecutor structure has no public members * The OrcOpcodeExecutor structure has no public members
*/ */
struct _OrcOpcodeExecutor { struct _OrcOpcodeExecutor {
/*< private >*/ /*< private >*/
int src_values[ORC_STATIC_OPCODE_N_SRC]; int src_values[ORC_STATIC_OPCODE_N_SRC];
int dest_values[ORC_STATIC_OPCODE_N_DEST]; int dest_values[ORC_STATIC_OPCODE_N_DEST];
}; };
skipping to change at line 388 skipping to change at line 416
/*< private >*/ /*< private >*/
OrcProgram *program; OrcProgram *program;
int n; int n;
int counter1; int counter1;
int counter2; int counter2;
int counter3; int counter3;
void *arrays[ORC_N_VARIABLES]; void *arrays[ORC_N_VARIABLES];
int params[ORC_N_VARIABLES]; int params[ORC_N_VARIABLES];
int accumulators[4]; int accumulators[4];
/* exec pointer is stored in arrays[ORC_VAR_A1] */
/* row pointers are stored in arrays[i+ORC_VAR_C1] */
/* the stride for arrays[x] is stored in params[x] */
/* m is stored in params[ORC_VAR_A1] */
/* m_index is stored in params[ORC_VAR_A2] */
/* elapsed time is stored in params[ORC_VAR_A3] */
/* source resampling parameters are in params[ORC_VAR_C1..C8] */
};
/* the alternate view of OrcExecutor */
struct _OrcExecutorAlt {
/*< private >*/
OrcProgram *program;
int n;
int counter1;
int counter2;
int counter3;
void *arrays[ORC_N_ARRAYS];
OrcExecutorFunc exec;
void *unused1[ORC_N_VARIABLES - ORC_N_ARRAYS - 1];
int strides[ORC_N_ARRAYS];
int m;
int m_index;
int time;
int unused2;
int src_resample[8];
int params[ORC_VAR_T1-ORC_VAR_P1];
int unused3[ORC_N_VARIABLES - ORC_VAR_T1];
int accumulators[4];
}; };
#define ORC_EXECUTOR_EXEC(ex) ((OrcExecutorFunc)((ex)->arrays[ORC_VAR_A1]))
#define ORC_EXECUTOR_M(ex) ((ex)->params[ORC_VAR_A1])
#define ORC_EXECUTOR_M_INDEX(ex) ((ex)->params[ORC_VAR_A2])
#define ORC_EXECUTOR_TIME(ex) ((ex)->params[ORC_VAR_A3])
/** /**
* OrcTarget: * OrcTarget:
* *
*/ */
struct _OrcTarget { struct _OrcTarget {
const char *name; const char *name;
orc_bool executable; orc_bool executable;
int data_register_offset; int data_register_offset;
unsigned int (*get_default_flags)(void); unsigned int (*get_default_flags)(void);
void (*compiler_init)(OrcCompiler *compiler); void (*compiler_init)(OrcCompiler *compiler);
void (*compile)(OrcCompiler *compiler); void (*compile)(OrcCompiler *compiler);
OrcRuleSet rule_sets[ORC_N_RULE_SETS]; OrcRuleSet rule_sets[ORC_N_RULE_SETS];
int n_rule_sets; int n_rule_sets;
void *_unused[10]; const char * (*get_asm_preamble)(void);
void (*load_constant)(OrcCompiler *compiler, int reg, int size, int value
);
void *_unused[8];
}; };
void orc_init (void); void orc_init (void);
OrcProgram * orc_program_new (void); OrcProgram * orc_program_new (void);
OrcProgram * orc_program_new_ds (int size1, int size2); OrcProgram * orc_program_new_ds (int size1, int size2);
OrcProgram * orc_program_new_dss (int size1, int size2, int size3); OrcProgram * orc_program_new_dss (int size1, int size2, int size3);
OrcProgram * orc_program_new_as (int size1, int size2); OrcProgram * orc_program_new_as (int size1, int size2);
OrcProgram * orc_program_new_ass (int size1, int size2, int size3); OrcProgram * orc_program_new_ass (int size1, int size2, int size3);
OrcStaticOpcode * orc_opcode_find_by_name (const char *name); OrcStaticOpcode * orc_opcode_find_by_name (const char *name);
void orc_opcode_init (void); void orc_opcode_init (void);
const char * orc_program_get_name (OrcProgram *program); const char * orc_program_get_name (OrcProgram *program);
void orc_program_set_name (OrcProgram *program, const char *name); void orc_program_set_name (OrcProgram *program, const char *name);
void orc_program_set_2d (OrcProgram *program);
void orc_program_set_constant_n (OrcProgram *program, int n);
void orc_program_set_constant_m (OrcProgram *program, int m);
void orc_program_append (OrcProgram *p, const char *opcode, int arg0, int a rg1, int arg2); void orc_program_append (OrcProgram *p, const char *opcode, int arg0, int a rg1, int arg2);
void orc_program_append_str (OrcProgram *p, const char *opcode, void orc_program_append_str (OrcProgram *p, const char *opcode,
const char * arg0, const char * arg1, const char * arg2); const char * arg0, const char * arg1, const char * arg2);
void orc_program_append_ds (OrcProgram *program, const char *opcode, int ar g0, void orc_program_append_ds (OrcProgram *program, const char *opcode, int ar g0,
int arg1); int arg1);
void orc_program_append_ds_str (OrcProgram *p, const char *opcode, void orc_program_append_ds_str (OrcProgram *p, const char *opcode,
const char * arg0, const char * arg1); const char * arg0, const char * arg1);
void orc_program_append_dds_str (OrcProgram *program, const char *name,
const char *arg1, const char *arg2, const char *arg3);
void orc_mmx_init (void); void orc_mmx_init (void);
void orc_sse_init (void); void orc_sse_init (void);
void orc_arm_init (void); void orc_arm_init (void);
void orc_powerpc_init (void); void orc_powerpc_init (void);
void orc_c_init (void); void orc_c_init (void);
void orc_c64x_c_init (void);
OrcCompileResult orc_program_compile (OrcProgram *p); OrcCompileResult orc_program_compile (OrcProgram *p);
OrcCompileResult orc_program_compile_for_target (OrcProgram *p, OrcTarget * target); OrcCompileResult orc_program_compile_for_target (OrcProgram *p, OrcTarget * target);
OrcCompileResult orc_program_compile_full (OrcProgram *p, OrcTarget *target , OrcCompileResult orc_program_compile_full (OrcProgram *p, OrcTarget *target ,
unsigned int flags); unsigned int flags);
void orc_program_set_backup_function (OrcProgram *p, OrcExecutorFunc func); void orc_program_set_backup_function (OrcProgram *p, OrcExecutorFunc func);
void orc_program_free (OrcProgram *program); void orc_program_free (OrcProgram *program);
int orc_program_find_var_by_name (OrcProgram *program, const char *name); int orc_program_find_var_by_name (OrcProgram *program, const char *name);
int orc_program_add_temporary (OrcProgram *program, int size, const char *n ame); int orc_program_add_temporary (OrcProgram *program, int size, const char *n ame);
int orc_program_dup_temporary (OrcProgram *program, int i, int j); int orc_program_dup_temporary (OrcProgram *program, int i, int j);
int orc_program_add_source (OrcProgram *program, int size, const char *name ); int orc_program_add_source (OrcProgram *program, int size, const char *name );
int orc_program_add_destination (OrcProgram *program, int size, const char *name); int orc_program_add_destination (OrcProgram *program, int size, const char *name);
int orc_program_add_constant (OrcProgram *program, int size, int value, con st char *name); int orc_program_add_constant (OrcProgram *program, int size, int value, con st char *name);
int orc_program_add_parameter (OrcProgram *program, int size, const char *n ame); int orc_program_add_parameter (OrcProgram *program, int size, const char *n ame);
int orc_program_add_accumulator (OrcProgram *program, int size, const char *name); int orc_program_add_accumulator (OrcProgram *program, int size, const char *name);
void orc_program_set_type_name (OrcProgram *program, int var, const char *t ype_name); void orc_program_set_type_name (OrcProgram *program, int var, const char *t ype_name);
void orc_program_set_sampling_type (OrcProgram *program, int var, int sampl ing_type);
OrcExecutor * orc_executor_new (OrcProgram *program); OrcExecutor * orc_executor_new (OrcProgram *program);
void orc_executor_free (OrcExecutor *ex); void orc_executor_free (OrcExecutor *ex);
void orc_executor_set_program (OrcExecutor *ex, OrcProgram *program); void orc_executor_set_program (OrcExecutor *ex, OrcProgram *program);
void orc_executor_set_array (OrcExecutor *ex, int var, void *ptr); void orc_executor_set_array (OrcExecutor *ex, int var, void *ptr);
void orc_executor_set_stride (OrcExecutor *ex, int var, int stride);
void orc_executor_set_array_str (OrcExecutor *ex, const char *name, void *p tr); void orc_executor_set_array_str (OrcExecutor *ex, const char *name, void *p tr);
void orc_executor_set_param (OrcExecutor *ex, int var, int value); void orc_executor_set_param (OrcExecutor *ex, int var, int value);
void orc_executor_set_param_str (OrcExecutor *ex, const char *name, int val ue); void orc_executor_set_param_str (OrcExecutor *ex, const char *name, int val ue);
int orc_executor_get_accumulator (OrcExecutor *ex, int var); int orc_executor_get_accumulator (OrcExecutor *ex, int var);
int orc_executor_get_accumulator_str (OrcExecutor *ex, const char *name); int orc_executor_get_accumulator_str (OrcExecutor *ex, const char *name);
void orc_executor_set_n (OrcExecutor *ex, int n); void orc_executor_set_n (OrcExecutor *ex, int n);
void orc_executor_set_m (OrcExecutor *ex, int m);
void orc_executor_emulate (OrcExecutor *ex); void orc_executor_emulate (OrcExecutor *ex);
void orc_executor_run (OrcExecutor *ex); void orc_executor_run (OrcExecutor *ex);
OrcOpcodeSet *orc_opcode_set_get (const char *name); OrcOpcodeSet *orc_opcode_set_get (const char *name);
OrcOpcodeSet *orc_opcode_set_get_nth (int opcode_major);
int orc_opcode_set_find_by_name (OrcOpcodeSet *opcode_set, const char *name ); int orc_opcode_set_find_by_name (OrcOpcodeSet *opcode_set, const char *name );
int orc_opcode_register_static (OrcStaticOpcode *sopcode, char *prefix); int orc_opcode_register_static (OrcStaticOpcode *sopcode, char *prefix);
OrcRuleSet * orc_rule_set_new (OrcOpcodeSet *opcode_set, OrcTarget *target, OrcRuleSet * orc_rule_set_new (OrcOpcodeSet *opcode_set, OrcTarget *target,
unsigned int required_flags); unsigned int required_flags);
void orc_rule_register (OrcRuleSet *rule_set, const char *opcode_name, void orc_rule_register (OrcRuleSet *rule_set, const char *opcode_name,
OrcRuleEmitFunc emit, void *emit_user); OrcRuleEmitFunc emit, void *emit_user);
OrcRule * orc_target_get_rule (OrcTarget *target, OrcStaticOpcode *opcode, OrcRule * orc_target_get_rule (OrcTarget *target, OrcStaticOpcode *opcode,
unsigned int target_flags); unsigned int target_flags);
OrcTarget * orc_target_get_default (void); OrcTarget * orc_target_get_default (void);
unsigned int orc_target_get_default_flags (OrcTarget *target); unsigned int orc_target_get_default_flags (OrcTarget *target);
const char * orc_target_get_name (OrcTarget *target); const char * orc_target_get_name (OrcTarget *target);
int orc_program_allocate_register (OrcProgram *program, int is_data); int orc_program_allocate_register (OrcProgram *program, int is_data);
void orc_compiler_allocate_codemem (OrcCompiler *compiler); void orc_compiler_allocate_codemem (OrcCompiler *compiler);
int orc_compiler_label_new (OrcCompiler *compiler); int orc_compiler_label_new (OrcCompiler *compiler);
int orc_compiler_get_constant (OrcCompiler *compiler, int size, int value);
const char *orc_program_get_asm_code (OrcProgram *program); const char *orc_program_get_asm_code (OrcProgram *program);
const char *orc_target_get_asm_preamble (const char *target); const char *orc_target_get_asm_preamble (const char *target);
const char * orc_target_get_preamble (OrcTarget *target);
void orc_compiler_append_code (OrcCompiler *p, const char *fmt, ...) void orc_compiler_append_code (OrcCompiler *p, const char *fmt, ...)
ORC_GNU_PRINTF(2,3); ORC_GNU_PRINTF(2,3);
void orc_target_register (OrcTarget *target); void orc_target_register (OrcTarget *target);
OrcTarget *orc_target_get_by_name (const char *target_name); OrcTarget *orc_target_get_by_name (const char *target_name);
int orc_program_get_max_var_size (OrcProgram *program); int orc_program_get_max_var_size (OrcProgram *program);
int orc_program_get_max_array_size (OrcProgram *program); int orc_program_get_max_array_size (OrcProgram *program);
int orc_program_get_max_accumulator_size (OrcProgram *program);
#endif #endif
 End of changes. 24 change blocks. 
4 lines changed or deleted 84 lines changed or added


 orcsse.h   orcsse.h 
skipping to change at line 72 skipping to change at line 72
int src, int dest); int src, int dest);
void orc_sse_emit_0f (OrcCompiler *p, const char *insn_name, int code, void orc_sse_emit_0f (OrcCompiler *p, const char *insn_name, int code,
int src, int dest); int src, int dest);
void orc_sse_emit_pshufd (OrcCompiler *p, int shuf, int src, int dest); void orc_sse_emit_pshufd (OrcCompiler *p, int shuf, int src, int dest);
void orc_sse_emit_pshuflw (OrcCompiler *p, int shuf, int src, int dest); void orc_sse_emit_pshuflw (OrcCompiler *p, int shuf, int src, int dest);
void orc_sse_emit_shiftimm (OrcCompiler *p, const char *insn_name, void orc_sse_emit_shiftimm (OrcCompiler *p, const char *insn_name,
int code, int modrm_code, int shift, int reg); int code, int modrm_code, int shift, int reg);
unsigned int orc_sse_get_cpu_flags (void); unsigned int orc_sse_get_cpu_flags (void);
/* SSE instructions */
/* SSE2 instructions */
#define orc_sse_emit_punpcklbw(p,a,b) orc_sse_emit_660f (p, "punpcklbw", 0
x60, a, b)
#define orc_sse_emit_punpcklwd(p,a,b) orc_sse_emit_660f (p, "punpcklwd", 0
x61, a, b)
#define orc_sse_emit_punpckldq(p,a,b) orc_sse_emit_660f (p, "punpckldq", 0
x62, a, b)
#define orc_sse_emit_packsswb(p,a,b) orc_sse_emit_660f (p, "packsswb", 0x
63, a, b)
#define orc_sse_emit_pcmpgtb(p,a,b) orc_sse_emit_660f (p, "pcmpgtb", 0x6
4, a, b)
#define orc_sse_emit_pcmpgtw(p,a,b) orc_sse_emit_660f (p, "pcmpgtw", 0x6
5, a, b)
#define orc_sse_emit_pcmpgtd(p,a,b) orc_sse_emit_660f (p, "pcmpgtd", 0x6
6, a, b)
#define orc_sse_emit_packuswb(p,a,b) orc_sse_emit_660f (p, "packuswb", 0x
67, a, b)
#define orc_sse_emit_punpckhbw(p,a,b) orc_sse_emit_660f (p, "punpckhbw", 0
x68, a, b)
#define orc_sse_emit_punpckhwd(p,a,b) orc_sse_emit_660f (p, "punpckhwd", 0
x69, a, b)
#define orc_sse_emit_punpckhdq(p,a,b) orc_sse_emit_660f (p, "punpckhdq", 0
x6a, a, b)
#define orc_sse_emit_packssdw(p,a,b) orc_sse_emit_660f (p, "packssdw", 0x
6b, a, b)
#define orc_sse_emit_punpcklqdq(p,a,b) orc_sse_emit_660f (p, "punpcklqdq",
0x6c, a, b)
#define orc_sse_emit_punpckhqdq(p,a,b) orc_sse_emit_660f (p, "punpckhqdq",
0x6d, a, b)
#define orc_sse_emit_movdqa(p,a,b) orc_sse_emit_660f (p, "movdqa", 0x6f
, a, b)
#define orc_sse_emit_psraw(p,a,b) orc_sse_emit_shiftimm (p, "psraw", 0
x71, 4, a, b)
#define orc_sse_emit_psrlw(p,a,b) orc_sse_emit_shiftimm (p, "psrlw", 0
x71, 2, a, b)
#define orc_sse_emit_psllw(p,a,b) orc_sse_emit_shiftimm (p, "psllw", 0
x71, 6, a, b)
#define orc_sse_emit_psrad(p,a,b) orc_sse_emit_shiftimm (p, "psrad", 0
x72, 4, a, b)
#define orc_sse_emit_psrld(p,a,b) orc_sse_emit_shiftimm (p, "psrld", 0
x72, 2, a, b)
#define orc_sse_emit_pslld(p,a,b) orc_sse_emit_shiftimm (p, "pslld", 0
x72, 6, a, b)
#define orc_sse_emit_psrlq(p,a,b) orc_sse_emit_shiftimm (p, "psrlq", 0
x73, 2, a, b)
#define orc_sse_emit_psllq(p,a,b) orc_sse_emit_shiftimm (p, "psllq", 0
x73, 6, a, b)
#define orc_sse_emit_psrldq(p,a,b) orc_sse_emit_shiftimm (p, "psrldq",
0x73, 3, a, b)
#define orc_sse_emit_pslldq(p,a,b) orc_sse_emit_shiftimm (p, "pslldq",
0x73, 7, a, b)
#define orc_sse_emit_pcmpeqb(p,a,b) orc_sse_emit_660f (p, "pcmpeqb", 0x7
4, a, b)
#define orc_sse_emit_pcmpeqw(p,a,b) orc_sse_emit_660f (p, "pcmpeqw", 0x7
5, a, b)
#define orc_sse_emit_pcmpeqd(p,a,b) orc_sse_emit_660f (p, "pcmpeqd", 0x7
6, a, b)
#define orc_sse_emit_pinsrw(p,a,b) orc_sse_emit_660f (p, "pinsrw", 0xc4
, a, b)
#define orc_sse_emit_pextrw(p,a,b) orc_sse_emit_660f (p, "pextrw", 0xc5
, a, b)
#define orc_sse_emit_paddq(p,a,b) orc_sse_emit_660f (p, "paddq", 0xd4,
a, b)
#define orc_sse_emit_pmullw(p,a,b) orc_sse_emit_660f (p, "pmullw", 0xd5
, a, b)
#define orc_sse_emit_psubusb(p,a,b) orc_sse_emit_660f (p, "psubusb", 0xd
8, a, b)
#define orc_sse_emit_psubusw(p,a,b) orc_sse_emit_660f (p, "psubusw", 0xd
9, a, b)
#define orc_sse_emit_pminub(p,a,b) orc_sse_emit_660f (p, "pminub", 0xda
, a, b)
#define orc_sse_emit_pand(p,a,b) orc_sse_emit_660f (p, "pand", 0xdb,
a, b)
#define orc_sse_emit_paddusb(p,a,b) orc_sse_emit_660f (p, "paddusb", 0xd
c, a, b)
#define orc_sse_emit_paddusw(p,a,b) orc_sse_emit_660f (p, "paddusw", 0xd
d, a, b)
#define orc_sse_emit_pmaxub(p,a,b) orc_sse_emit_660f (p, "pmaxub", 0xde
, a, b)
#define orc_sse_emit_pandn(p,a,b) orc_sse_emit_660f (p, "pandn", 0xdf,
a, b)
#define orc_sse_emit_pavgb(p,a,b) orc_sse_emit_660f (p, "pavgb", 0xe0,
a, b)
#define orc_sse_emit_pavgw(p,a,b) orc_sse_emit_660f (p, "pavgw", 0xe3,
a, b)
#define orc_sse_emit_pmulhw(p,a,b) orc_sse_emit_660f (p, "pmulhw", 0xe5
, a, b)
#define orc_sse_emit_psubsb(p,a,b) orc_sse_emit_660f (p, "psubsb", 0xe8
, a, b)
#define orc_sse_emit_psubsw(p,a,b) orc_sse_emit_660f (p, "psubsw", 0xe9
, a, b)
#define orc_sse_emit_pminsw(p,a,b) orc_sse_emit_660f (p, "pminsw", 0xea
, a, b)
#define orc_sse_emit_por(p,a,b) orc_sse_emit_660f (p, "por", 0xeb, a
, b)
#define orc_sse_emit_paddsb(p,a,b) orc_sse_emit_660f (p, "paddsb", 0xec
, a, b)
#define orc_sse_emit_paddsw(p,a,b) orc_sse_emit_660f (p, "paddsw", 0xed
, a, b)
#define orc_sse_emit_pmaxsw(p,a,b) orc_sse_emit_660f (p, "pmaxsw", 0xee
, a, b)
#define orc_sse_emit_pxor(p,a,b) orc_sse_emit_660f (p, "pxor", 0xef,
a, b)
#define orc_sse_emit_pmuludq(p,a,b) orc_sse_emit_660f (p, "pmuludq", 0xf
4, a, b)
#define orc_sse_emit_pmaddwd(p,a,b) orc_sse_emit_660f (p, "pmaddwd", 0xf
5, a, b)
#define orc_sse_emit_psadbw(p,a,b) orc_sse_emit_660f (p, "psadbw", 0xf6
, a, b)
#define orc_sse_emit_psubb(p,a,b) orc_sse_emit_660f (p, "psubb", 0xf8,
a, b)
#define orc_sse_emit_psubw(p,a,b) orc_sse_emit_660f (p, "psubw", 0xf9,
a, b)
#define orc_sse_emit_psubd(p,a,b) orc_sse_emit_660f (p, "psubd", 0xfa,
a, b)
#define orc_sse_emit_psubq(p,a,b) orc_sse_emit_660f (p, "psubq", 0xfb,
a, b)
#define orc_sse_emit_paddb(p,a,b) orc_sse_emit_660f (p, "paddb", 0xfc,
a, b)
#define orc_sse_emit_paddw(p,a,b) orc_sse_emit_660f (p, "paddw", 0xfd,
a, b)
#define orc_sse_emit_paddd(p,a,b) orc_sse_emit_660f (p, "paddd", 0xfe,
a, b)
/* SSE3 instructions */
/* SSSE3 instructions */
#define orc_sse_emit_pshufb(p,a,b) orc_sse_emit_660f (p, "pshufb", 0x38
00, a, b)
#define orc_sse_emit_phaddw(p,a,b) orc_sse_emit_660f (p, "phaddw", 0x38
01, a, b)
#define orc_sse_emit_phaddd(p,a,b) orc_sse_emit_660f (p, "phaddd", 0x38
02, a, b)
#define orc_sse_emit_phaddsw(p,a,b) orc_sse_emit_660f (p, "phaddsw", 0x3
803, a, b)
#define orc_sse_emit_pmaddubsw(p,a,b) orc_sse_emit_660f (p, "pmaddubsw", 0
x3804, a, b)
#define orc_sse_emit_phsubw(p,a,b) orc_sse_emit_660f (p, "phsubw", 0x38
05, a, b)
#define orc_sse_emit_phsubd(p,a,b) orc_sse_emit_660f (p, "phsubd", 0x38
06, a, b)
#define orc_sse_emit_phsubsw(p,a,b) orc_sse_emit_660f (p, "phsubsw", 0x3
807, a, b)
#define orc_sse_emit_psignb(p,a,b) orc_sse_emit_660f (p, "psignb", 0x38
08, a, b)
#define orc_sse_emit_psignw(p,a,b) orc_sse_emit_660f (p, "psignw", 0x38
09, a, b)
#define orc_sse_emit_psignd(p,a,b) orc_sse_emit_660f (p, "psignd", 0x38
0a, a, b)
#define orc_sse_emit_pmulhrsw(p,a,b) orc_sse_emit_660f (p, "pmulhrsw", 0x
380b, a, b)
#define orc_sse_emit_pabsb(p,a,b) orc_sse_emit_660f (p, "pabsb", 0x381
c, a, b)
#define orc_sse_emit_pabsw(p,a,b) orc_sse_emit_660f (p, "pabsw", 0x381
d, a, b)
#define orc_sse_emit_pabsd(p,a,b) orc_sse_emit_660f (p, "pabsd", 0x381
e, a, b)
/* SSE4.1 instructions */
#define orc_sse_emit_pmovsxbw(p,a,b) orc_sse_emit_660f (p, "pmovsxbw", 0x
3820, a, b)
#define orc_sse_emit_pmovsxbd(p,a,b) orc_sse_emit_660f (p, "pmovsxbd", 0x
3821, a, b)
#define orc_sse_emit_pmovsxbq(p,a,b) orc_sse_emit_660f (p, "pmovsxbq", 0x
3822, a, b)
#define orc_sse_emit_pmovsxwd(p,a,b) orc_sse_emit_660f (p, "pmovsxwd", 0x
3823, a, b)
#define orc_sse_emit_pmovsxwq(p,a,b) orc_sse_emit_660f (p, "pmovsxwq", 0x
3824, a, b)
#define orc_sse_emit_pmovsxdq(p,a,b) orc_sse_emit_660f (p, "pmovsxdq", 0x
3825, a, b)
#define orc_sse_emit_pmuldq(p,a,b) orc_sse_emit_660f (p, "pmuldq", 0x38
28, a, b)
#define orc_sse_emit_pcmpeqq(p,a,b) orc_sse_emit_660f (p, "pcmpeqq", 0x3
829, a, b)
#define orc_sse_emit_packusdw(p,a,b) orc_sse_emit_660f (p, "packuswd", 0x
382b, a, b)
#define orc_sse_emit_pmovzxbw(p,a,b) orc_sse_emit_660f (p, "pmovzxbw", 0x
3830, a, b)
#define orc_sse_emit_pmovzxbd(p,a,b) orc_sse_emit_660f (p, "pmovzxbd", 0x
3831, a, b)
#define orc_sse_emit_pmovzxbq(p,a,b) orc_sse_emit_660f (p, "pmovzxbq", 0x
3832, a, b)
#define orc_sse_emit_pmovzxwd(p,a,b) orc_sse_emit_660f (p, "pmovzxwd", 0x
3833, a, b)
#define orc_sse_emit_pmovzxwq(p,a,b) orc_sse_emit_660f (p, "pmovzxwq", 0x
3834, a, b)
#define orc_sse_emit_pmovzxdq(p,a,b) orc_sse_emit_660f (p, "pmovzxdq", 0x
3835, a, b)
#define orc_sse_emit_pmulld(p,a,b) orc_sse_emit_660f (p, "pmuldq", 0x38
40, a, b)
#define orc_sse_emit_phminposuw(p,a,b) orc_sse_emit_660f (p, "phminposuw",
0x3841, a, b)
#define orc_sse_emit_pminsb(p,a,b) orc_sse_emit_660f (p, "pminsb", 0x38
38, a, b)
#define orc_sse_emit_pminsd(p,a,b) orc_sse_emit_660f (p, "pminsd", 0x38
39, a, b)
#define orc_sse_emit_pminuw(p,a,b) orc_sse_emit_660f (p, "pminuw", 0x38
3a, a, b)
#define orc_sse_emit_pminud(p,a,b) orc_sse_emit_660f (p, "pminud", 0x38
3b, a, b)
#define orc_sse_emit_pmaxsb(p,a,b) orc_sse_emit_660f (p, "pmaxsb", 0x38
3c, a, b)
#define orc_sse_emit_pmaxsd(p,a,b) orc_sse_emit_660f (p, "pmaxsd", 0x38
3d, a, b)
#define orc_sse_emit_pmaxuw(p,a,b) orc_sse_emit_660f (p, "pmaxuw", 0x38
3e, a, b)
#define orc_sse_emit_pmaxud(p,a,b) orc_sse_emit_660f (p, "pmaxud", 0x38
3f, a, b)
/* SSE4.2 instructions */
#define orc_sse_emit_pcmpgtq(p,a,b) orc_sse_emit_660f (p, "pcmpgtq", 0x3
837, a, b)
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 233 lines changed or added


 orctest.h   orctest.h 
skipping to change at line 16 skipping to change at line 16
#include <orc/orcutils.h> #include <orc/orcutils.h>
ORC_BEGIN_DECLS ORC_BEGIN_DECLS
typedef enum { typedef enum {
ORC_TEST_FAILED = 0, ORC_TEST_FAILED = 0,
ORC_TEST_INDETERMINATE = 1, ORC_TEST_INDETERMINATE = 1,
ORC_TEST_OK = 2 ORC_TEST_OK = 2
} OrcTestResult; } OrcTestResult;
#define ORC_TEST_FLAGS_BACKUP (1<<0)
#define ORC_TEST_FLAGS_FLOAT (1<<1)
void orc_test_init (void); void orc_test_init (void);
OrcTestResult orc_test_gcc_compile (OrcProgram *p); OrcTestResult orc_test_gcc_compile (OrcProgram *p);
void orc_test_random_bits (void *data, int n_bytes); void orc_test_random_bits (void *data, int n_bytes);
OrcTestResult orc_test_compare_output (OrcProgram *program); OrcTestResult orc_test_compare_output (OrcProgram *program);
OrcTestResult orc_test_compare_output_full (OrcProgram *program, int flags) ;
OrcTestResult orc_test_compare_output_backup (OrcProgram *program); OrcTestResult orc_test_compare_output_backup (OrcProgram *program);
OrcProgram *orc_test_get_program_for_opcode (OrcStaticOpcode *opcode); OrcProgram *orc_test_get_program_for_opcode (OrcStaticOpcode *opcode);
OrcProgram *orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode) ; OrcProgram *orc_test_get_program_for_opcode_const (OrcStaticOpcode *opcode) ;
OrcProgram *orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode) ; OrcProgram *orc_test_get_program_for_opcode_param (OrcStaticOpcode *opcode) ;
ORC_END_DECLS ORC_END_DECLS
#endif #endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added


 orcutils.h   orcutils.h 
skipping to change at line 55 skipping to change at line 55
#ifndef MIN #ifndef MIN
#define MIN(a,b) ((a)<(b) ? (a) : (b)) #define MIN(a,b) ((a)<(b) ? (a) : (b))
#endif #endif
#ifndef MAX #ifndef MAX
#define MAX(a,b) ((a)>(b) ? (a) : (b)) #define MAX(a,b) ((a)>(b) ? (a) : (b))
#endif #endif
#ifndef ORC_CLAMP #ifndef ORC_CLAMP
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#endif #endif
#define ORC_PTR_TO_INT(x) ((int)(long)(x)) #define ORC_PTR_TO_INT(x) ((int)(long)(x))
#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (of fset)))
#define ORC_READ_UINT32_LE(ptr) \ #define ORC_READ_UINT32_LE(ptr) \
((uint32_t)( \ ((uint32_t)( \
((uint8_t *)(ptr))[0] | \ ((uint8_t *)(ptr))[0] | \
(((uint8_t *)(ptr))[1]<<8) | \ (((uint8_t *)(ptr))[1]<<8) | \
(((uint8_t *)(ptr))[2]<<16) | \ (((uint8_t *)(ptr))[2]<<16) | \
(((uint8_t *)(ptr))[3]<<24))) (((uint8_t *)(ptr))[3]<<24)))
#define ORC_WRITE_UINT32_LE(ptr,val) \ #define ORC_WRITE_UINT32_LE(ptr,val) \
do { \ do { \
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 orcx86.h   orcx86.h 
skipping to change at line 46 skipping to change at line 46
void orc_x86_emit_mov_imm_reg (OrcCompiler *compiler, int size, int value, int reg1); void orc_x86_emit_mov_imm_reg (OrcCompiler *compiler, int size, int value, int reg1);
void orc_x86_emit_mov_reg_reg (OrcCompiler *compiler, int size, int reg1, i nt reg2); void orc_x86_emit_mov_reg_reg (OrcCompiler *compiler, int size, int reg1, i nt reg2);
void orc_x86_emit_test_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2); void orc_x86_emit_test_reg_reg (OrcCompiler *compiler, int size, int reg1, int reg2);
void orc_x86_emit_sar_imm_reg (OrcCompiler *compiler, int size, int value, int reg); void orc_x86_emit_sar_imm_reg (OrcCompiler *compiler, int size, int value, int reg);
void orc_x86_emit_dec_memoffset (OrcCompiler *compiler, int size, int offse t, int reg); void orc_x86_emit_dec_memoffset (OrcCompiler *compiler, int size, int offse t, int reg);
void orc_x86_emit_add_imm_memoffset (OrcCompiler *compiler, int size, int v alue, int offset, int reg); void orc_x86_emit_add_imm_memoffset (OrcCompiler *compiler, int size, int v alue, int offset, int reg);
void orc_x86_emit_add_reg_memoffset (OrcCompiler *compiler, int size, int r eg1, int offset, int reg); void orc_x86_emit_add_reg_memoffset (OrcCompiler *compiler, int size, int r eg1, int offset, int reg);
void orc_x86_emit_and_imm_memoffset (OrcCompiler *compiler, int size, int v alue, int offset, int reg); void orc_x86_emit_and_imm_memoffset (OrcCompiler *compiler, int size, int v alue, int offset, int reg);
void orc_x86_emit_add_imm_reg (OrcCompiler *compiler, int size, int value, int reg); void orc_x86_emit_add_imm_reg (OrcCompiler *compiler, int size, int value, int reg);
void orc_x86_emit_and_imm_reg (OrcCompiler *compiler, int size, int value, int reg); void orc_x86_emit_and_imm_reg (OrcCompiler *compiler, int size, int value, int reg);
void orc_x86_emit_add_reg_reg (OrcCompiler *compiler, int size, int reg1, i nt reg2);
void orc_x86_emit_sub_reg_reg (OrcCompiler *compiler, int size, int reg1, i nt reg2); void orc_x86_emit_sub_reg_reg (OrcCompiler *compiler, int size, int reg1, i nt reg2);
void orc_x86_emit_imul_memoffset_reg (OrcCompiler *compiler, int size,
int offset, int reg, int destreg);
void orc_x86_emit_sub_memoffset_reg (OrcCompiler *compiler, int size, void orc_x86_emit_sub_memoffset_reg (OrcCompiler *compiler, int size,
int offset, int reg, int destreg); int offset, int reg, int destreg);
void orc_x86_emit_cmp_reg_memoffset (OrcCompiler *compiler, int size, int r eg1, void orc_x86_emit_cmp_reg_memoffset (OrcCompiler *compiler, int size, int r eg1,
int offset, int reg); int offset, int reg);
void orc_x86_emit_cmp_imm_memoffset (OrcCompiler *compiler, int size, int v alue, void orc_x86_emit_cmp_imm_memoffset (OrcCompiler *compiler, int size, int v alue,
int offset, int reg); int offset, int reg);
void orc_x86_emit_test_imm_memoffset (OrcCompiler *compiler, int size, int value, void orc_x86_emit_test_imm_memoffset (OrcCompiler *compiler, int size, int value,
int offset, int reg); int offset, int reg);
void orc_x86_emit_emms (OrcCompiler *compiler); void orc_x86_emit_emms (OrcCompiler *compiler);
void orc_x86_emit_ret (OrcCompiler *compiler); void orc_x86_emit_ret (OrcCompiler *compiler);
 End of changes. 2 change blocks. 
0 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/