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/46225] New: Wrong code generated for certain constants


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: unassigned@gcc.gnu.org
        ReportedBy: jadamcze@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


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