| orcpowerpc.h | | orcpowerpc.h | |
| | | | |
| skipping to change at line 79 | | skipping to change at line 79 | |
| POWERPC_V29, | | POWERPC_V29, | |
| POWERPC_V30, | | POWERPC_V30, | |
| POWERPC_V31 | | POWERPC_V31 | |
| }; | | }; | |
| | | | |
| const char * powerpc_get_regname(int i); | | const char * powerpc_get_regname(int i); | |
| int powerpc_regnum (int i); | | int powerpc_regnum (int i); | |
| | | | |
| void powerpc_emit(OrcCompiler *compiler, unsigned int insn); | | void powerpc_emit(OrcCompiler *compiler, unsigned int insn); | |
| | | | |
|
| | | void powerpc_emit_add (OrcCompiler *compiler, int regd, int rega, int regb) | |
| | | ; | |
| | | void powerpc_emit_addi_rec (OrcCompiler *compiler, int regd, int rega, int | |
| | | imm); | |
| void powerpc_emit_addi (OrcCompiler *compiler, int regd, int rega, int imm)
; | | void powerpc_emit_addi (OrcCompiler *compiler, int regd, int rega, int imm)
; | |
| void powerpc_emit_lwz (OrcCompiler *compiler, int regd, int rega, int imm); | | void powerpc_emit_lwz (OrcCompiler *compiler, int regd, int rega, int imm); | |
|
| | | void powerpc_emit_stw (OrcCompiler *compiler, int regs, int rega, int offse
t); | |
| void powerpc_emit_stwu (OrcCompiler *compiler, int regs, int rega, int offs
et); | | void powerpc_emit_stwu (OrcCompiler *compiler, int regs, int rega, int offs
et); | |
| | | | |
| void powerpc_emit_ret (OrcCompiler *compiler); | | void powerpc_emit_ret (OrcCompiler *compiler); | |
| void powerpc_emit_b (OrcCompiler *compiler, int label); | | void powerpc_emit_b (OrcCompiler *compiler, int label); | |
| void powerpc_emit_beq (OrcCompiler *compiler, int label); | | void powerpc_emit_beq (OrcCompiler *compiler, int label); | |
| void powerpc_emit_bne (OrcCompiler *compiler, int label); | | void powerpc_emit_bne (OrcCompiler *compiler, int label); | |
| void powerpc_emit_label (OrcCompiler *compiler, int label); | | void powerpc_emit_label (OrcCompiler *compiler, int label); | |
| void powerpc_add_fixup (OrcCompiler *compiler, int type, unsigned char *ptr
, int label); | | void powerpc_add_fixup (OrcCompiler *compiler, int type, unsigned char *ptr
, int label); | |
| void powerpc_do_fixups (OrcCompiler *compiler); | | void powerpc_do_fixups (OrcCompiler *compiler); | |
| void powerpc_flush (OrcCompiler *compiler); | | void powerpc_flush (OrcCompiler *compiler); | |
| | | | |
| skipping to change at line 108 | | skipping to change at line 111 | |
| 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, | | void powerpc_emit_VA_2 (OrcCompiler *compiler, const char *name, int major,
int d, | |
| int a, int b, int c, int minor); | | 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
, | | void powerpc_emit_VX_3 (OrcCompiler *p, const char *name, unsigned int insn
, | |
| int d, int a, int b, int c); | | int d, int a, int b, int c); | |
|
| | | void powerpc_emit_VX_3_reg (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
, | | void powerpc_emit_VX_4 (OrcCompiler *p, const char *name, unsigned int insn
, | |
| int d, int a); | | int d, int a); | |
| int powerpc_get_constant (OrcCompiler *p, int type, int value); | | int powerpc_get_constant (OrcCompiler *p, int type, int value); | |
|
| | | int powerpc_get_constant_full (OrcCompiler *p, int value0, int value1, int
value2, int value3); | |
| | | | |
| /* instructions */ | | /* instructions */ | |
| #define powerpc_emit_vandc(p,a,b,c) powerpc_emit_VX_2 (p, "vandc", 0
x10000444, a, b, c) | | #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_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_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_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_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_vmulesh(p,a,b,c) powerpc_emit_VX_2 (p, "vmulesh",
0x10000348, a, b, c) | |
| | | | |
| skipping to change at line 156 | | skipping to change at line 162 | |
| #define powerpc_emit_vminsb(p,a,b,c) powerpc_emit_VX_2 (p, "vminsb",
0x10000302, 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_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_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_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_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_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_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) | | #define powerpc_emit_vperm(p,a,b,c,d) powerpc_emit_VX_3_reg (p, "vperm
", 0x1000002b, a, b, c, d) | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 10 lines changed or added | |
|
| orcprogram.h | | orcprogram.h | |
| | | | |
| skipping to change at line 32 | | skipping to change at line 32 | |
| | | | |
| 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_ARRAYS 12 | |
| #define ORC_N_REGISTERS 20 | | #define ORC_N_REGISTERS 20 | |
|
| #define ORC_N_FIXUPS 20 | | #define ORC_N_FIXUPS 40 | |
| #define ORC_N_CONSTANTS 20 | | #define ORC_N_CONSTANTS 20 | |
|
| #define ORC_N_LABELS 20 | | #define ORC_N_LABELS 40 | |
| | | | |
| #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_REG_INVALID 0 | |
| | | | |
| #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 | |
| | | | |
| #define ORC_OPCODE_N_ARGS 4 | | #define ORC_OPCODE_N_ARGS 4 | |
| #define ORC_N_TARGETS 10 | | #define ORC_N_TARGETS 10 | |
| #define ORC_N_RULE_SETS 10 | | #define ORC_N_RULE_SETS 10 | |
| | | | |
| #define ORC_STRUCT_OFFSET(struct_type, member) \ | | #define ORC_STRUCT_OFFSET(struct_type, member) \ | |
| ((long) ((unsigned int *) &((struct_type*) 0)->member)) | | ((long) ((unsigned int *) &((struct_type*) 0)->member)) | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 85 | |
| 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) | | ORC_TARGET_C_NOEXEC = (1<<2) | |
| }; | | }; | |
| | | | |
| enum { | | enum { | |
| ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0) | | ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0) | |
| }; | | }; | |
| | | | |
|
| | | enum { | |
| | | ORC_TARGET_NEON_CLEAN_COMPILE = (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, | |
| ORC_VAR_TYPE_CONST, | | ORC_VAR_TYPE_CONST, | |
| ORC_VAR_TYPE_PARAM, | | ORC_VAR_TYPE_PARAM, | |
| ORC_VAR_TYPE_ACCUMULATOR | | ORC_VAR_TYPE_ACCUMULATOR | |
| } OrcVarType; | | } OrcVarType; | |
| | | | |
| enum { | | enum { | |
| | | | |
| skipping to change at line 148 | | skipping to change at line 153 | |
| ORC_VAR_T13, | | ORC_VAR_T13, | |
| ORC_VAR_T14, | | ORC_VAR_T14, | |
| 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, | |
|
| | | ORC_CONST_FULL | |
| }; | | }; | |
| | | | |
| enum { | | enum { | |
| ORC_SAMPLE_REGULAR = 0, | | ORC_SAMPLE_REGULAR = 0, | |
| ORC_SAMPLE_TRANSPOSED, | | ORC_SAMPLE_TRANSPOSED, | |
| ORC_SAMPLE_NEAREST, | | ORC_SAMPLE_NEAREST, | |
| ORC_SAMPLE_BILINEAR, | | ORC_SAMPLE_BILINEAR, | |
| ORC_SAMPLE_FOUR_TAP | | ORC_SAMPLE_FOUR_TAP | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 381 | | skipping to change at line 387 | |
| int use_frame_pointer; | | int use_frame_pointer; | |
| | | | |
| char *asm_code; | | char *asm_code; | |
| 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 insn_index; | |
| int need_mask_regs; | | int need_mask_regs; | |
| int unroll_shift; | | int unroll_shift; | |
|
| | | | |
| | | int alloc_loop_counter; | |
| | | int loop_counter; | |
| }; | | }; | |
| | | | |
| #define ORC_SRC_ARG(p,i,n) ((p)->vars[(i)->src_args[(n)]].alloc) | | #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_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_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_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_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) | | #define ORC_DEST_VAL(p,i,n) ((p)->vars[(i)->dest_args[(n)]].value) | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 507 | | skipping to change at line 517 | |
| 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, | | void orc_program_append_dds_str (OrcProgram *program, const char *name, | |
| const char *arg1, const char *arg2, const char *arg3); | | 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_neon_init (void); | |
| | | void orc_c64x_init (void); | |
| void orc_c64x_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); | |
| | | | |
End of changes. 8 change blocks. |
| 2 lines changed or deleted | | 14 lines changed or added | |
|
| orcx86.h | | orcx86.h | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 59 | |
| int offset, int reg, int destreg); | | 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_rep_movs (OrcCompiler *compiler, int size); | |
| void orc_x86_emit_ret (OrcCompiler *compiler); | | void orc_x86_emit_ret (OrcCompiler *compiler); | |
| void orc_x86_emit_jle (OrcCompiler *compiler, int label); | | void orc_x86_emit_jle (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_je (OrcCompiler *compiler, int label); | | void orc_x86_emit_je (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_jne (OrcCompiler *compiler, int label); | | void orc_x86_emit_jne (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_jmp (OrcCompiler *compiler, int label); | | void orc_x86_emit_jmp (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_label (OrcCompiler *compiler, int label); | | void orc_x86_emit_label (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_align (OrcCompiler *compiler); | | void orc_x86_emit_align (OrcCompiler *compiler); | |
| void orc_x86_emit_prologue (OrcCompiler *compiler); | | void orc_x86_emit_prologue (OrcCompiler *compiler); | |
| void orc_x86_emit_epilogue (OrcCompiler *compiler); | | void orc_x86_emit_epilogue (OrcCompiler *compiler); | |
| | | | |
| void orc_x86_emit_rex (OrcCompiler *compiler, int size, int reg1, int reg2,
int reg3); | | void orc_x86_emit_rex (OrcCompiler *compiler, int size, int reg1, int reg2,
int reg3); | |
| void orc_x86_emit_modrm_memoffset (OrcCompiler *compiler, int reg1, int off
set, int reg2); | | void orc_x86_emit_modrm_memoffset (OrcCompiler *compiler, int reg1, int off
set, int reg2); | |
| void orc_x86_emit_modrm_reg (OrcCompiler *compiler, int reg1, int reg2); | | void orc_x86_emit_modrm_reg (OrcCompiler *compiler, int reg1, int reg2); | |
| | | | |
| void orc_x86_do_fixups (OrcCompiler *compiler); | | void orc_x86_do_fixups (OrcCompiler *compiler); | |
| | | | |
|
| | | int orc_x86_assemble_copy_check (OrcCompiler *compiler); | |
| | | void orc_x86_assemble_copy (OrcCompiler *compiler); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 4 lines changed or added | |
|