From: Michael Meissner Date: Thu, 8 May 1997 19:58:20 +0000 (+0000) Subject: reverse bit number for bbo/bbz instructions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e0e7911a5eb37ae2e5eecf14b393180ab0137aa;p=binutils-gdb.git reverse bit number for bbo/bbz instructions. --- diff --git a/sim/tic80/ChangeLog b/sim/tic80/ChangeLog index 4a458e428fb..33d6b1b3ba2 100644 --- a/sim/tic80/ChangeLog +++ b/sim/tic80/ChangeLog @@ -3,6 +3,7 @@ Thu May 8 11:57:47 1997 Michael Meissner * insns (jsr,bsr): For non-allulled calls, set r31 so that the return address does not reexecute the instruction in the delay slot. + (bbo,bbz): Reverse bit number. * misc.c (tic80_trace_*): Change format slightly to accomidate real large decimal values. diff --git a/sim/tic80/insns b/sim/tic80/insns index 7c16213a775..65278338f20 100644 --- a/sim/tic80/insns +++ b/sim/tic80/insns @@ -107,7 +107,7 @@ void::function::do_and:signed32 *rDest, signed32 Source1, signed32 Source2 instruction_address::function::do_bbo:instruction_address nia, int bitnum, unsigned32 source, int annul, unsigned32 offset int jump_p; unsigned32 target = cia.ip + 4 * offset; - if (MASKED32 (source, bitnum, bitnum)) + if (MASKED32 (source, 32 - bitnum, 32 - bitnum)) { if (annul) nia.ip = -1; @@ -131,7 +131,7 @@ instruction_address::function::do_bbo:instruction_address nia, int bitnum, unsig instruction_address::function::do_bbz:instruction_address nia, int bitnum, unsigned32 source, int annul, unsigned32 offset int jump_p; unsigned32 target = cia.ip + 4 * offset; - if (!MASKED32 (source, bitnum, bitnum)) + if (!MASKED32 (source, 32 - bitnum, 32 - bitnum)) { if (annul) nia.ip = -1;