From 245940209d5b8458f5d998783f7992573e2951bf Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Mon, 2 Dec 2019 18:02:37 -0500 Subject: Started implementing some pthreads support. --- opcode.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'opcode.c') diff --git a/opcode.c b/opcode.c index 4484466..e4bd510 100644 --- a/opcode.c +++ b/opcode.c @@ -372,7 +372,7 @@ void bfc(struct sux *cpu, uint8_t flag, uint64_t adr, uint8_t thread) { uint64_t immaddr(struct sux *cpu, uint8_t thread, uint8_t size) { uint64_t adr = cpu->pc[thread]; cpu->pc[thread]+=size; - clk+=size; + clk++; return adr; } @@ -386,7 +386,6 @@ uint64_t absaddr(struct sux *cpu, uint8_t thread) { | (uint64_t)addr[cpu->pc[thread]+6] << 48 | (uint64_t)addr[cpu->pc[thread]+7] << 56; cpu->pc[thread]+=8; - ibcount+=8; clk++; return adr; } @@ -397,11 +396,7 @@ uint32_t zeromtx(struct sux *cpu, uint8_t thread) { | (uint32_t)addr[cpu->pc[thread]+2] << 16 | (uint32_t)addr[cpu->pc[thread]+3] << 24; cpu->pc[thread]+=4; - ibcount+=4; - if (ibcount > 8) { - clk++; - ibcount = 0; - } + clk++; return adr; } @@ -412,11 +407,7 @@ uint32_t zeromx(struct sux *cpu, uint8_t thread) { | (uint32_t)addr[cpu->pc[thread]+3] << 24; adr += cpu->x[thread]; cpu->pc[thread]+=4; - ibcount+=4; - if (ibcount > 8) { - clk++; - ibcount = 0; - } + clk++; return adr; } @@ -427,10 +418,6 @@ uint32_t zeromy(struct sux *cpu, uint8_t thread) { | (uint32_t)addr[cpu->pc[thread]+3] << 24; adr += cpu->y[thread]; cpu->pc[thread]+=4; - ibcount+=4; - if (ibcount > 8) { - clk++; - ibcount = 0; - } + clk++; return adr; } -- cgit v1.2.3-13-gbd6f