[LLVMbugs] [Bug 6202] New: [mips] wrong transfer of double float value from FP register to GP register
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Feb 1 17:26:23 PST 2010
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: bruno.cardoso at gmail.com
ReportedBy: zhou_shuchang at sina.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list