mirror of
https://github.com/mupen64plus-ae/mupen64plus-core.git
synced 2024-11-27 07:30:33 +00:00
new_dynarec: Add COND_ prefix to eCond enum
This commit is contained in:
parent
e898991b92
commit
c6ed8828c3
@ -32,22 +32,22 @@
|
||||
#define fp_memory_map (offsetof(struct new_dynarec_hot_state, memory_map))
|
||||
|
||||
typedef enum {
|
||||
EQ,
|
||||
NE,
|
||||
CS,
|
||||
CC,
|
||||
MI,
|
||||
PL,
|
||||
VS,
|
||||
VC,
|
||||
HI,
|
||||
LS,
|
||||
GE,
|
||||
LT,
|
||||
GT,
|
||||
LE,
|
||||
AW,
|
||||
NV
|
||||
COND_EQ,
|
||||
COND_NE,
|
||||
COND_CS,
|
||||
COND_CC,
|
||||
COND_MI,
|
||||
COND_PL,
|
||||
COND_VS,
|
||||
COND_VC,
|
||||
COND_HI,
|
||||
COND_LS,
|
||||
COND_GE,
|
||||
COND_LT,
|
||||
COND_GT,
|
||||
COND_LE,
|
||||
COND_AW,
|
||||
COND_NV
|
||||
} eCond;
|
||||
|
||||
void jump_vaddr_x0(void);
|
||||
@ -1719,10 +1719,10 @@ static void emit_cmovne_imm(int imm,int rt)
|
||||
assert(imm==0||imm==1);
|
||||
if(imm){
|
||||
assem_debug("csinc %s,%s,%s,eq",regname[rt],regname[rt],regname[WZR]);
|
||||
output_w32(0x1a800400|WZR<<16|EQ<<12|rt<<5|rt);
|
||||
output_w32(0x1a800400|WZR<<16|COND_EQ<<12|rt<<5|rt);
|
||||
}else{
|
||||
assem_debug("csel %s,%s,%s,ne",regname[rt],regname[WZR],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|NE<<12|WZR<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_NE<<12|WZR<<5|rt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1731,10 +1731,10 @@ static void emit_cmovl_imm(int imm,int rt)
|
||||
assert(imm==0||imm==1);
|
||||
if(imm){
|
||||
assem_debug("csinc %s,%s,%s,ge",regname[rt],regname[rt],regname[WZR]);
|
||||
output_w32(0x1a800400|WZR<<16|GE<<12|rt<<5|rt);
|
||||
output_w32(0x1a800400|WZR<<16|COND_GE<<12|rt<<5|rt);
|
||||
}else{
|
||||
assem_debug("csel %s,%s,%s,lt",regname[rt],regname[WZR],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|LT<<12|WZR<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_LT<<12|WZR<<5|rt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1743,10 +1743,10 @@ static void emit_cmovb_imm(int imm,int rt)
|
||||
assert(imm==0||imm==1);
|
||||
if(imm){
|
||||
assem_debug("csinc %s,%s,%s,cs",regname[rt],regname[rt],regname[WZR]);
|
||||
output_w32(0x1a800400|WZR<<16|CS<<12|rt<<5|rt);
|
||||
output_w32(0x1a800400|WZR<<16|COND_CS<<12|rt<<5|rt);
|
||||
}else{
|
||||
assem_debug("csel %s,%s,%s,cc",regname[rt],regname[WZR],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|CC<<12|WZR<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_CC<<12|WZR<<5|rt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1755,59 +1755,59 @@ static void emit_cmovs_imm(int imm,int rt)
|
||||
assert(imm==0||imm==1);
|
||||
if(imm){
|
||||
assem_debug("csinc %s,%s,%s,pl",regname[rt],regname[rt],regname[WZR]);
|
||||
output_w32(0x1a800400|WZR<<16|PL<<12|rt<<5|rt);
|
||||
output_w32(0x1a800400|WZR<<16|COND_PL<<12|rt<<5|rt);
|
||||
}else{
|
||||
assem_debug("csel %s,%s,%s,mi",regname[rt],regname[WZR],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|MI<<12|WZR<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_MI<<12|WZR<<5|rt);
|
||||
}
|
||||
}
|
||||
|
||||
static void emit_cmove_reg(int rs,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,eq",regname[rt],regname[rs],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|EQ<<12|rs<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_EQ<<12|rs<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_cmovne_reg(int rs,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,ne",regname[rt],regname[rs],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|NE<<12|rs<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_NE<<12|rs<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_cmovl_reg(int rs,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,lt",regname[rt],regname[rs],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|LT<<12|rs<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_LT<<12|rs<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_cmovs_reg(int rs,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,mi",regname[rt],regname[rs],regname[rt]);
|
||||
output_w32(0x1a800000|rt<<16|MI<<12|rs<<5|rt);
|
||||
output_w32(0x1a800000|rt<<16|COND_MI<<12|rs<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_csel_vs(int rs1,int rs2,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,vs",regname[rt],regname[rs1],regname[rs2]);
|
||||
output_w32(0x1a800000|rs2<<16|VS<<12|rs1<<5|rt);
|
||||
output_w32(0x1a800000|rs2<<16|COND_VS<<12|rs1<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_csel_eq(int rs1,int rs2,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,eq",regname[rt],regname[rs1],regname[rs2]);
|
||||
output_w32(0x1a800000|rs2<<16|EQ<<12|rs1<<5|rt);
|
||||
output_w32(0x1a800000|rs2<<16|COND_EQ<<12|rs1<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_csel_cc(int rs1,int rs2,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,cc",regname[rt],regname[rs1],regname[rs2]);
|
||||
output_w32(0x1a800000|rs2<<16|CC<<12|rs1<<5|rt);
|
||||
output_w32(0x1a800000|rs2<<16|COND_CC<<12|rs1<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_csel_ls(int rs1,int rs2,int rt)
|
||||
{
|
||||
assem_debug("csel %s,%s,%s,ls",regname[rt],regname[rs1],regname[rs2]);
|
||||
output_w32(0x1a800000|rs2<<16|LS<<12|rs1<<5|rt);
|
||||
output_w32(0x1a800000|rs2<<16|COND_LS<<12|rs1<<5|rt);
|
||||
}
|
||||
|
||||
static void emit_slti32(int rs,int imm,int rt)
|
||||
@ -1957,70 +1957,70 @@ static void emit_jne(intptr_t a)
|
||||
{
|
||||
assem_debug("bne %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|NE);
|
||||
output_w32(0x54000000|offset<<5|COND_NE);
|
||||
}
|
||||
|
||||
static void emit_jeq(intptr_t a)
|
||||
{
|
||||
assem_debug("beq %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|EQ);
|
||||
output_w32(0x54000000|offset<<5|COND_EQ);
|
||||
}
|
||||
|
||||
static void emit_js(intptr_t a)
|
||||
{
|
||||
assem_debug("bmi %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|MI);
|
||||
output_w32(0x54000000|offset<<5|COND_MI);
|
||||
}
|
||||
|
||||
static void emit_jns(intptr_t a)
|
||||
{
|
||||
assem_debug("bpl %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|PL);
|
||||
output_w32(0x54000000|offset<<5|COND_PL);
|
||||
}
|
||||
|
||||
static void emit_jl(intptr_t a)
|
||||
{
|
||||
assem_debug("blt %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|LT);
|
||||
output_w32(0x54000000|offset<<5|COND_LT);
|
||||
}
|
||||
|
||||
static void emit_jge(intptr_t a)
|
||||
{
|
||||
assem_debug("bge %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|GE);
|
||||
output_w32(0x54000000|offset<<5|COND_GE);
|
||||
}
|
||||
|
||||
static void emit_jno(intptr_t a)
|
||||
{
|
||||
assem_debug("bvc %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|VC);
|
||||
output_w32(0x54000000|offset<<5|COND_VC);
|
||||
}
|
||||
|
||||
static void emit_jcc(intptr_t a)
|
||||
{
|
||||
assem_debug("bcc %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|CC);
|
||||
output_w32(0x54000000|offset<<5|COND_CC);
|
||||
}
|
||||
|
||||
static void emit_jae(intptr_t a)
|
||||
{
|
||||
assem_debug("bcs %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|CS);
|
||||
output_w32(0x54000000|offset<<5|COND_CS);
|
||||
}
|
||||
|
||||
static void emit_jb(intptr_t a)
|
||||
{
|
||||
assem_debug("bcc %x",a);
|
||||
u_int offset=gencondjmp(a);
|
||||
output_w32(0x54000000|offset<<5|CC);
|
||||
output_w32(0x54000000|offset<<5|COND_CC);
|
||||
}
|
||||
|
||||
static void emit_pushreg(u_int r)
|
||||
|
Loading…
Reference in New Issue
Block a user