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

           Summary: Wrong code generated for certain constants
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: jadam...@utas.edu.au


Target spu-elf, same result with 4.4.5 and 4.5.1

Appears to be an error with constant folding?


For bug.c:

qword f(qword a) {
    qword q ={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
    return si_ah(a,q);
}


$ spu-elf-gcc bug.c -c -S -o- -O1
        .file   "bug.c"
.text
        .align  3
        .global f
        .type   f, @function
f:
        ahi     $3,$3,1
        bi      $lr
        .size   f, .-f
        .ident  "GCC: (Gentoo 4.5.1 p1.1, pie-0.4.5) 4.5.1"


ahi $3,$3,1 is wrong here - it should be ahi $3,$3,257

Reply via email to