Thanks Oleg, fixed.
here is the patch (in case if cvs is not updated yet)

cheers,
~d

Index: msp430.c
===================================================================
RCS file: /cvsroot/mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.c,v
retrieving revision 1.78
diff -c -3 -p -r1.78 msp430.c
*** msp430.c    27 Nov 2003 11:18:41 -0000      1.78
--- msp430.c    19 Jan 2004 15:41:30 -0000
*************** emit_indexed_arith (insn, operands, m, c
*** 3008,3013 ****
--- 3008,3014 ----
      }

    if (followed_compare_condition (insn) != UNKNOWN
+       || GET_CODE(insn) == JUMP_INSN
        || (pattern
          && GET_CODE (pattern) == SET
          && SET_DEST (pattern) == cc0_rtx)



On Monday 19 January 2004 18:18, Oleg Skydan wrote:
> Hi, All !
>
> It looks like I have found a bug.
>
> Here is an extract from the source (for more see attachment):
>
> uint32_t CalcStepTime(uint8_t s)
> {
> uint32_t n=0;
> long a;
>    FeedAcc-=48000L*2560;
>    if(breaking)
>    {
>       a=-MaxdV;
>    }
>    else if(Feed<cframe.Feed)
>    {
>       a=MaxdV;
>    }
>    else a=0;
>    do
>    {
>       Feed+=a;
>       if(a>0 && Feed>=cframe.Feed)a=0;
>       if(Feed<0){ Feed=0; return n; }
>       n++;
>    }while(Add(Feed,FeedAcc)>=0);
>    return n;
> }
>
>
>
> And here is a piece of listing:
>
>   56:bug.c         ****       if(a>0 && Feed>=cframe.Feed)a=0;
> GAS LISTING C:\DOCUME~1\9335~1\LOCALS~1\Temp/ccEdbaaa.s    page 5
>
>
>  172                 .stabn 68,0,56,.LM8-CalcStepTime
>  173                .LM8:
>  174 0040 0C4A        mov r10, r12
>  175 0042 0D4B        mov r11, r13
>  176 0044 1C83        sub #llo(1), r12
>  177 0046 0D73        subc #lhi(1), r13
>  178 0048 0638        jl .L9
>  179 004a 3E87        sub @r7+, r14
>  180 004c 3F77        subc @r7+, r15
>  181 004e 2782        sub #4,    r7 ; restore r7  <<restoring r7 in a such
> way will destroy comparison result !!!!!!!
>  182 0050 0228        jlo .L9
>  183 0052 0A43        mov #llo(0), r10
>  184 0054 0B43        mov #lhi(0), r11
>  185                .L9:
>
> I used my own build from the CVS sources from 31.12.03.
>
> All the best !
> Bye.

-- 
/*****************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild     UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  State Polytechnical Univ.
      (_Y_.)'  ._   )  `._ `. ``-..-'   Radio-Physics Departament
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,  Russia
   (il),-''  (li),'  ((!.-'             +7 (812) 5403923, 5585314
 *****************************************************************/


Reply via email to