http://llvm.org/bugs/show_bug.cgi?id=6202

           Summary: [mips] wrong transfer of double float value from FP
                    register to GP register
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: ASSIGNED
          Keywords: miscompilation
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=4162)
 --> (http://llvm.org/bugs/attachment.cgi?id=4162)
test floating point sqrt

#include<stdio.h>
#include<math.h>
int main(int argc,char** argv)
{
        float f=argc;
        printf("%f\n",sqrt(f));
}

with ./a.out, we get 0.0 instead of 1.0.

In assembly
        sqrt.d $f2, $f2
        mov.s $f12, $f2
        ~~~~~~~~~~~~~~~ sqrt.d keep the result in $f2-$f3 pair, but only $f2 is
transferred.
        swc1 $f12, 60($fp)


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to