array problem

kamil51
2007-07-11
2013-03-12
  • kamil51

    kamil51 - 2007-07-11

    following example code is not genareting correct asm. code
    data unsigned char ARAMA[13];

    void func (void);

    unsigned char i=0;

    unsigned char tmp=0;

        for (i=0;i<=12;i=i+2){
    tmp=arry[i] & 0x7f;
                                }
    // genareted code as below;
        C$GSM.c$250$1$1 ==.
    ;    GSM.c:250: for (i=0;i<=12;i++){
        mov    r2,#0x00
    00183$:
        mov    a,r2
        add    a,#0xff - 0x0C
        jc    00186$
        inc    r2
        sjmp    00183$
    //
    where is the code generated for the line   tmp=arry[i] & 0x7f;

    regards

    kamil

     
    • Oliver Sedlacek

      Oliver Sedlacek - 2007-07-11

      tmp is never used, so it has been optimised away.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks