This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/39633] [avr] loop bug: missing 8-bit comparison (*cmpqi)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39633

--- Comment #10 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-10 08:29:04 UTC ---
Created attachment 24729
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24729
Minimal test case

Here is a minimal testcase:

char c;

void func_1 (char a)
{
    a = a >> 7;
    if (a)
        c = a;
}

Code with 4.6.1 -Os -dp -S -mmcu=atmega88:

func_1:
    lsl r24     ;  6    ashrqi3/5    [length = 2]
    sbc r24,r24
    breq .L1     ;  8    branch    [length = 1]
    sts c,r24     ;  10    *movqi/3    [length = 2]
.L1:
    ret     ;  20    return    [length = 1]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]