Merge branch 'master' of github.com:86Box/86Box into tc1995
This commit is contained in:
@@ -21,7 +21,7 @@ void codegen_accumulate(int acc_reg, int delta)
|
||||
{
|
||||
acc_regs[acc_reg].count += delta;
|
||||
|
||||
if (delta != 0) {
|
||||
if ((acc_reg == ACCREG_cycles) && (delta != 0)) {
|
||||
addbyte(0x81); /*ADD $acc_regs[c].count,acc_regs[c].dest*/
|
||||
addbyte(0x04);
|
||||
addbyte(0x25);
|
||||
|
@@ -21,7 +21,7 @@ void codegen_accumulate(int acc_reg, int delta)
|
||||
{
|
||||
acc_regs[acc_reg].count += delta;
|
||||
|
||||
if (delta != 0) {
|
||||
if ((acc_reg == ACCREG_cycles) && (delta != 0)) {
|
||||
addbyte(0x81); /*ADD $acc_regs[c].count,acc_regs[c].dest*/
|
||||
addbyte(0x05);
|
||||
addlong((uint32_t) (uintptr_t) &(acycs));
|
||||
@@ -45,8 +45,6 @@ void codegen_accumulate_flush(void)
|
||||
|
||||
acc_regs[c].count = 0;
|
||||
}
|
||||
|
||||
acycs = 0;
|
||||
}
|
||||
|
||||
void codegen_accumulate_reset()
|
||||
|
@@ -21,7 +21,7 @@ void codegen_accumulate(ir_data_t *ir, int acc_reg, int delta)
|
||||
{
|
||||
acc_regs[acc_reg].count += delta;
|
||||
|
||||
if (delta != 0) {
|
||||
if ((acc_reg == ACCREG_cycles) && (delta != 0)) {
|
||||
uop_ADD_IMM(ir, IREG_acycs, IREG_acycs, -delta);
|
||||
}
|
||||
}
|
||||
|
@@ -283,23 +283,20 @@ void update_tsc(void)
|
||||
int cycdiff;
|
||||
uint64_t delta;
|
||||
|
||||
if (CACHE_ON())
|
||||
cycdiff = acycs;
|
||||
else
|
||||
cycdiff = cycles_old - cycles;
|
||||
cycdiff = cycles_old - cycles;
|
||||
if (inrecomp)
|
||||
cycdiff += acycs;
|
||||
|
||||
delta = tsc - tsc_old;
|
||||
if (delta > 0) {
|
||||
/* TSC has changed, this means interim timer processing has happened,
|
||||
see how much we still need to add. */
|
||||
cycdiff -= delta;
|
||||
if (cycdiff > 0)
|
||||
tsc += cycdiff;
|
||||
} else {
|
||||
/* TSC has not changed. */
|
||||
if (cycdiff > 0)
|
||||
tsc += cycdiff;
|
||||
}
|
||||
|
||||
if (cycdiff > 0)
|
||||
tsc += cycdiff;
|
||||
|
||||
if (cycdiff > 0) {
|
||||
if (TIMER_VAL_LESS_THAN_VAL(timer_target, (uint32_t)tsc))
|
||||
timer_process();
|
||||
@@ -319,6 +316,7 @@ void exec386_dynarec(int cycs)
|
||||
|
||||
int cyc_period = cycs / 2000; /*5us*/
|
||||
|
||||
acycs = 0;
|
||||
cycles_main += cycs;
|
||||
while (cycles_main > 0)
|
||||
{
|
||||
@@ -540,6 +538,7 @@ void exec386_dynarec(int cycs)
|
||||
|
||||
inrecomp=1;
|
||||
code();
|
||||
acycs = 0;
|
||||
inrecomp=0;
|
||||
|
||||
#ifndef USE_NEW_DYNAREC
|
||||
|
Reference in New Issue
Block a user