hanchenye-llvm-project/llvm
Daniel Sanders 059e4b158c [mips][fp64] Add an implicit def to MFHC1 claiming that it reads the lower 32-bits of 64-bit FPR
Summary:
This is a white lie to workaround a widespread bug in the -mfp64
implementation.

The problem is that none of the 32-bit fpu ops mention the fact that they
clobber the upper 32-bits of the 64-bit FPR. This allows MFHC1 to be
scheduled on the wrong side of most 32-bit FPU ops. Fixing that requires a
major overhaul of the FPU implementation which can't be done right now due to
time constraints.

MFHC1 is one of two affected instructions. These instructions are the only
FPU instructions that don't read or write the lower 32-bits. We therefore
pretend that it reads the bottom 32-bits to artificially create a dependency and
prevent the scheduler changing the behaviour of the code.
The other instruction is MTHC1 which will be fixed once I've have found a failing
test case for it. 

The testcase is test-suite/SingleSource/UnitTests/Vector/simple.c when
given TARGET_CFLAGS="-mips32r2 -mfp64 -mmsa".

Reviewers: jacksprat, matheusalmeida

Reviewed By: jacksprat

Differential Revision: http://llvm-reviews.chandlerc.com/D2966

llvm-svn: 203464
2014-03-10 15:01:57 +00:00
..
autoconf Now that we don't use libtool, we don't need to upgrade it :-) 2014-03-05 22:45:14 +00:00
bindings [python-bindings] Remove some cruft that snuck in. 2014-02-23 04:43:26 +00:00
cmake [CMake] add_llvm_target(): No need to include TABLEGEN_OUTPUT in source list. 2014-03-04 17:05:28 +00:00
docs IR: Change inalloca's grammar a bit 2014-03-09 06:41:58 +00:00
examples Fix warnings about an variable only used in asserts. 2014-03-06 06:35:46 +00:00
include Removing llvm::distance and llvm::copy for iterator_range based on post-commit review feedback. Adding an explicit range-based constructor to SmallVector, which supersedes the llvm::copy functionality. 2014-03-10 13:43:46 +00:00
lib [mips][fp64] Add an implicit def to MFHC1 claiming that it reads the lower 32-bits of 64-bit FPR 2014-03-10 15:01:57 +00:00
projects "Mac OS/X" -> "Mac OS X" spelling fixes for llvm. 2014-03-07 18:08:54 +00:00
test [mips] Assembly parser must invoke the target streamer to handle .set reorder macro. 2014-03-10 13:21:10 +00:00
tools [PM] Switch new pass manager from polymorphic_ptr to unique_ptr now that 2014-03-09 11:49:53 +00:00
unittests ADT/PointerIntPairTest.cpp: Appease msc17. 2014-03-10 02:33:17 +00:00
utils [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-09 18:03:14 +00:00
.arcconfig
.clang-format Test commit. 2014-03-02 13:08:46 +00:00
.gitignore
CMakeLists.txt Work around FreeBSD rtld rpath $ORIGIN limitation 2014-03-09 18:48:45 +00:00
CODE_OWNERS.TXT Add myself as owner for libc++ 2014-02-18 14:03:17 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
Makefile Provide CMake package modules in install tree 2014-02-09 16:37:02 +00:00
Makefile.common
Makefile.config.in Add patch level to llvm version in CMake and Autoconf 2014-03-03 15:22:00 +00:00
Makefile.rules "Mac OS/X" -> "Mac OS X" spelling fixes for llvm. 2014-03-07 18:08:54 +00:00
README.txt
configure Add patch level to llvm version in CMake and Autoconf 2014-03-03 15:22:00 +00:00
llvm.spec.in

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 documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

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