Initial commit of dynamic recompiler.
Various CPU changes to support dynamic recompiler.
This commit is contained in:
parent
17cae8a2d7
commit
4676daade4
52 changed files with 3740 additions and 1139 deletions
|
|
@ -5,7 +5,7 @@ static int opBT_w_r_a16(uint32_t fetchdat)
|
|||
|
||||
fetch_ea_16(fetchdat);
|
||||
eaaddr += ((regs[reg].w / 16) * 2); eal_r = 0;
|
||||
temp = geteaw(); if (abrt) return 0;
|
||||
temp = geteaw(); if (abrt) return 1;
|
||||
flags_rebuild();
|
||||
if (temp & (1 << (regs[reg].w & 15))) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
|
|
@ -19,7 +19,7 @@ static int opBT_w_r_a32(uint32_t fetchdat)
|
|||
|
||||
fetch_ea_32(fetchdat);
|
||||
eaaddr += ((regs[reg].w / 16) * 2); eal_r = 0;
|
||||
temp = geteaw(); if (abrt) return 0;
|
||||
temp = geteaw(); if (abrt) return 1;
|
||||
flags_rebuild();
|
||||
if (temp & (1 << (regs[reg].w & 15))) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
|
|
@ -33,7 +33,7 @@ static int opBT_l_r_a16(uint32_t fetchdat)
|
|||
|
||||
fetch_ea_16(fetchdat);
|
||||
eaaddr += ((regs[reg].l / 32) * 4); eal_r = 0;
|
||||
temp = geteal(); if (abrt) return 0;
|
||||
temp = geteal(); if (abrt) return 1;
|
||||
flags_rebuild();
|
||||
if (temp & (1 << (regs[reg].l & 31))) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
|
|
@ -47,7 +47,7 @@ static int opBT_l_r_a32(uint32_t fetchdat)
|
|||
|
||||
fetch_ea_32(fetchdat);
|
||||
eaaddr += ((regs[reg].l / 32) * 4); eal_r = 0;
|
||||
temp = geteal(); if (abrt) return 0;
|
||||
temp = geteal(); if (abrt) return 1;
|
||||
flags_rebuild();
|
||||
if (temp & (1 << (regs[reg].l & 31))) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
|
|
@ -64,10 +64,10 @@ static int opBT_l_r_a32(uint32_t fetchdat)
|
|||
\
|
||||
fetch_ea_16(fetchdat); \
|
||||
eaaddr += ((regs[reg].w / 16) * 2); eal_r = eal_w = 0; \
|
||||
temp = geteaw(); if (abrt) return 0; \
|
||||
temp = geteaw(); if (abrt) return 1; \
|
||||
tempc = (temp & (1 << (regs[reg].w & 15))) ? 1 : 0; \
|
||||
temp operation (1 << (regs[reg].w & 15)); \
|
||||
seteaw(temp); if (abrt) return 0; \
|
||||
seteaw(temp); if (abrt) return 1; \
|
||||
flags_rebuild(); \
|
||||
if (tempc) flags |= C_FLAG; \
|
||||
else flags &= ~C_FLAG; \
|
||||
|
|
@ -82,10 +82,10 @@ static int opBT_l_r_a32(uint32_t fetchdat)
|
|||
\
|
||||
fetch_ea_32(fetchdat); \
|
||||
eaaddr += ((regs[reg].w / 16) * 2); eal_r = eal_w = 0; \
|
||||
temp = geteaw(); if (abrt) return 0; \
|
||||
temp = geteaw(); if (abrt) return 1; \
|
||||
tempc = (temp & (1 << (regs[reg].w & 15))) ? 1 : 0; \
|
||||
temp operation (1 << (regs[reg].w & 15)); \
|
||||
seteaw(temp); if (abrt) return 0; \
|
||||
seteaw(temp); if (abrt) return 1; \
|
||||
flags_rebuild(); \
|
||||
if (tempc) flags |= C_FLAG; \
|
||||
else flags &= ~C_FLAG; \
|
||||
|
|
@ -100,10 +100,10 @@ static int opBT_l_r_a32(uint32_t fetchdat)
|
|||
\
|
||||
fetch_ea_16(fetchdat); \
|
||||
eaaddr += ((regs[reg].l / 32) * 4); eal_r = eal_w = 0; \
|
||||
temp = geteal(); if (abrt) return 0; \
|
||||
temp = geteal(); if (abrt) return 1; \
|
||||
tempc = (temp & (1 << (regs[reg].l & 31))) ? 1 : 0; \
|
||||
temp operation (1 << (regs[reg].l & 31)); \
|
||||
seteal(temp); if (abrt) return 0; \
|
||||
seteal(temp); if (abrt) return 1; \
|
||||
flags_rebuild(); \
|
||||
if (tempc) flags |= C_FLAG; \
|
||||
else flags &= ~C_FLAG; \
|
||||
|
|
@ -118,10 +118,10 @@ static int opBT_l_r_a32(uint32_t fetchdat)
|
|||
\
|
||||
fetch_ea_32(fetchdat); \
|
||||
eaaddr += ((regs[reg].l / 32) * 4); eal_r = eal_w = 0; \
|
||||
temp = geteal(); if (abrt) return 0; \
|
||||
temp = geteal(); if (abrt) return 1; \
|
||||
tempc = (temp & (1 << (regs[reg].l & 31))) ? 1 : 0; \
|
||||
temp operation (1 << (regs[reg].l & 31)); \
|
||||
seteal(temp); if (abrt) return 0; \
|
||||
seteal(temp); if (abrt) return 1; \
|
||||
flags_rebuild(); \
|
||||
if (tempc) flags |= C_FLAG; \
|
||||
else flags &= ~C_FLAG; \
|
||||
|
|
@ -142,7 +142,7 @@ static int opBA_w_a16(uint32_t fetchdat)
|
|||
fetch_ea_16(fetchdat);
|
||||
|
||||
temp = geteaw();
|
||||
count = getbyte(); if (abrt) return 0;
|
||||
count = getbyte(); if (abrt) return 1;
|
||||
tempc = temp & (1 << count);
|
||||
flags_rebuild();
|
||||
switch (rmdat & 0x38)
|
||||
|
|
@ -168,7 +168,7 @@ static int opBA_w_a16(uint32_t fetchdat)
|
|||
x86illegal();
|
||||
break;
|
||||
}
|
||||
seteaw(temp); if (abrt) return 0;
|
||||
seteaw(temp); if (abrt) return 1;
|
||||
if (tempc) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
cycles -= 6;
|
||||
|
|
@ -182,7 +182,7 @@ static int opBA_w_a32(uint32_t fetchdat)
|
|||
fetch_ea_32(fetchdat);
|
||||
|
||||
temp = geteaw();
|
||||
count = getbyte(); if (abrt) return 0;
|
||||
count = getbyte(); if (abrt) return 1;
|
||||
tempc = temp & (1 << count);
|
||||
flags_rebuild();
|
||||
switch (rmdat & 0x38)
|
||||
|
|
@ -208,7 +208,7 @@ static int opBA_w_a32(uint32_t fetchdat)
|
|||
x86illegal();
|
||||
break;
|
||||
}
|
||||
seteaw(temp); if (abrt) return 0;
|
||||
seteaw(temp); if (abrt) return 1;
|
||||
if (tempc) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
cycles -= 6;
|
||||
|
|
@ -223,7 +223,7 @@ static int opBA_l_a16(uint32_t fetchdat)
|
|||
fetch_ea_16(fetchdat);
|
||||
|
||||
temp = geteal();
|
||||
count = getbyte(); if (abrt) return 0;
|
||||
count = getbyte(); if (abrt) return 1;
|
||||
tempc = temp & (1 << count);
|
||||
flags_rebuild();
|
||||
switch (rmdat & 0x38)
|
||||
|
|
@ -249,7 +249,7 @@ static int opBA_l_a16(uint32_t fetchdat)
|
|||
x86illegal();
|
||||
break;
|
||||
}
|
||||
seteal(temp); if (abrt) return 0;
|
||||
seteal(temp); if (abrt) return 1;
|
||||
if (tempc) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
cycles -= 6;
|
||||
|
|
@ -263,7 +263,7 @@ static int opBA_l_a32(uint32_t fetchdat)
|
|||
fetch_ea_32(fetchdat);
|
||||
|
||||
temp = geteal();
|
||||
count = getbyte(); if (abrt) return 0;
|
||||
count = getbyte(); if (abrt) return 1;
|
||||
tempc = temp & (1 << count);
|
||||
flags_rebuild();
|
||||
switch (rmdat & 0x38)
|
||||
|
|
@ -289,7 +289,7 @@ static int opBA_l_a32(uint32_t fetchdat)
|
|||
x86illegal();
|
||||
break;
|
||||
}
|
||||
seteal(temp); if (abrt) return 0;
|
||||
seteal(temp); if (abrt) return 1;
|
||||
if (tempc) flags |= C_FLAG;
|
||||
else flags &= ~C_FLAG;
|
||||
cycles -= 6;
|
||||
|
|
|
|||
Loading…
Reference in a new issue