[LLVMbugs] [Bug 7143] New: error: SSE register return with SSE disabled (with -mno-mmx)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 14 14:43:19 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7143
Summary: error: SSE register return with SSE disabled (with
-mno-mmx)
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nomura at netapp.com
CC: llvmbugs at cs.uiuc.edu
Compiling floating-point code with -mno-mmx, clang aborts as follows:
[cyclsvl05]$ cat bug.i
double bar (void);
double foo()
{
return bar()+1.0;
}
/u/nomura/dl/Installed/clang/bin/clang -c -O0 -mno-mmx -w bug.i
fatal error: error in backend: SSE register return with SSE disabled
gcc would issue a similar error if -mno-sse were specified.
But gcc with -mno-mmx appears to proceed happily using SSE registers,
for example:
[cyclsvl05]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
[cyclsvl05]$ gcc -O0 -mno-mmx -S bug.i
[cyclsvl05]$
.LCFI0:
movq %rsp, %rbp
.LCFI1:
subq $16, %rsp
.LCFI2:
call bar
movapd %xmm0, %xmm1
movsd .LC0(%rip), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -8(%rbp)
movq -8(%rbp), %rax
movq %rax, -8(%rbp)
movsd -8(%rbp), %xmm0
leave
ret
I'm using a sync of clang+llvm from a couple days ago.
Is clang doing the right thing by aborting? (If so, what clang options
would you suggest to obtain compatibility with gcc and -mno-mmx?) Thanks.
--
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