LLVM backend for 6502
Go to file
Evan Cheng c143dd4f63 Fix buggy fcopysign lowering.
This
define float @foo(float %x, float %y) nounwind readnone {
entry:
  %0 = tail call float @copysignf(float %x, float %y) nounwind readnone
  ret float %0
}

Was compiled to:
    vmov     s0, r1
    bic      r0, r0, #-2147483648
    vmov     s1, r0
    vcmpe.f32    s0, #0
    vmrs         apsr_nzcv, fpscr
    it           lt
    vneglt.f32   s1, s1
    vmov         r0, s1
    bx           lr

This fails to copy the sign of -0.0f because it's lost during the float to int
conversion. Also, it's sub-optimal when the inputs are in GPR registers.

Now it uses integer and + or operations when it's profitable. And it's correct!
    lsrs    r1, r1, #31
    bfi     r0, r1, #31, #1
    bx      lr
rdar://8984306


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125357 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-11 02:28:55 +00:00
autoconf lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in config.h.*. 2011-02-09 04:18:48 +00:00
bindings Fix compiling the ocaml kaleidoscope tutorials 2011-02-09 18:32:02 +00:00
cmake CMake: LLVM_LIT_TOOLS_DIR is needed only on Win32 hosts to use GnuWin32 tools. 2011-02-10 10:29:42 +00:00
docs Don't run ocamldoc if it's not installed 2011-02-09 18:32:04 +00:00
examples Fix compiling the ocaml kaleidoscope tutorials 2011-02-09 18:32:02 +00:00
include Remove trailing whitespace. 2011-02-11 01:21:00 +00:00
lib Fix buggy fcopysign lowering. 2011-02-11 02:28:55 +00:00
projects Regen configure 2010-12-12 21:42:01 +00:00
runtime Implementation of path profiling. 2011-01-29 01:09:53 +00:00
test Fix buggy fcopysign lowering. 2011-02-11 02:28:55 +00:00
tools CMake: LLVM_NO_RTTI must be obsolete now! 2011-02-10 09:13:39 +00:00
unittests build: Add MAKEFILE_UNITTEST_NO_INCLUDE_COMMON build variable, to be leveraged 2011-02-04 17:12:18 +00:00
utils lit/TestFormats.py: Unittests may be found with suffix .exe also on Cygwin. 2011-02-10 09:11:57 +00:00
website
.gitignore Cleanup and document .gitignore. 2010-12-17 17:22:50 +00:00
build-for-llvm-top.sh
CMakeLists.txt Moved more stuff to HandleLLVMOptions.cmake 2011-02-05 19:08:42 +00:00
configure lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in config.h.*. 2011-02-09 04:18:48 +00:00
CREDITS.TXT Another git svn dcommit test. This time let's hope it doesn't kill my repo. 2010-12-10 14:45:10 +00:00
LICENSE.TXT
llvm.spec.in
Makefile Merge System into Support. 2010-11-29 18:16:10 +00:00
Makefile.common Removed trailing whitespace from Makefiles. 2009-01-09 16:44:42 +00:00
Makefile.config.in autoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll with --enable-shared on Cygming. 2010-12-29 03:59:14 +00:00
Makefile.rules Factor the computation of the basename of libraries. This avoids renaming 2011-02-03 22:01:15 +00:00
ModuleInfo.txt Remove trailing space. This is just an excuse to poke the 2010-10-05 20:32:15 +00:00
README.txt

\Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.