Thanks, applied. ~d
On Monday 14 October 2002 23:22, Galen Seitz wrote: > I discovered that the cycle count does not get incremented if a conditional > branch is not taken. The patch below fixes this. > > galen > > Index: sim/msp430/interp.c > =================================================================== > RCS file: /cvsroot/mspgcc/gdb/gdb-5.1.1/sim/msp430/interp.c,v > retrieving revision 1.14 > diff -u -r1.14 interp.c > --- sim/msp430/interp.c 27 Aug 2002 08:12:04 -0000 1.14 > +++ sim/msp430/interp.c 14 Oct 2002 19:09:46 -0000 > @@ -1088,25 +1088,32 @@ > > /* jumps */ > case JNZ: > - pc += 2 + ((!Z) ? msp430_offset(insn):0); > + tmp = msp430_offset(insn); > + pc += 2 + ((!Z) ? tmp:0); > break; > case JZ: > - pc += 2 + ((Z) ? msp430_offset(insn):0); > + tmp = msp430_offset(insn); > + pc += 2 + ((Z) ? tmp:0); > break; > case JC: > - pc += 2 + ((C) ? msp430_offset(insn):0); > + tmp = msp430_offset(insn); > + pc += 2 + ((C) ? tmp:0); > break; > case JNC: > - pc += 2 + ((!C) ? msp430_offset(insn):0); > + tmp = msp430_offset(insn); > + pc += 2 + ((!C) ? tmp:0); > break; > case JN: > - pc += 2 + ((N) ? msp430_offset(insn):0); > + tmp = msp430_offset(insn); > + pc += 2 + ((N) ? tmp:0); > break; > case JGE: > - pc += 2 + ((!(N^V)) ? msp430_offset(insn):0); > + tmp = msp430_offset(insn); > + pc += 2 + ((!(N^V)) ? tmp:0); > break; > case JL: > - pc += 2 + ((N^V) ? msp430_offset(insn):0); > + tmp = msp430_offset(insn); > + pc += 2 + ((N^V) ? tmp:0); > break; > case JMP: > pc += msp430_offset(insn) + 2; > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users -- /******************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314 ********************************************************************/
