Go to file
Craig Topper db2f084aa9 [X86] Don't set exception mask bits when modifying FPCW to change rounding mode for fp->int conversion
When we need to do an fp->int conversion using x87 instructions, we need to temporarily change the rounding mode to 0b11 and perform a store. To do this we save the old value of the fpcw to the stack, then set the fpcw to 0xc7f, do the store, then restore fpcw. But the 0xc7f value forces the exception mask bits 1. While this is what they would be in the default FP environment, as we move to support changing the FP environments, we shouldn't make this assumption.

This patch changes the code to explicitly OR 0xc00 with the old value so that only the rounding mode is changed. Unfortunately, this requires two stack temporaries instead of one. One to hold the old value and one to hold the new value. Without two stack temporaries we would need an additional GPR. We already need one to do the OR operation in. This is similar to what gcc and icc do for this operation. Though they are both better at reusing the stack temporaries when there are multiple truncates in a function(or at least in a basic block)

Differential Revision: https://reviews.llvm.org/D57788

llvm-svn: 354178
2019-02-15 21:59:33 +00:00
clang Fix implementation of [temp.local]p4. 2019-02-15 21:53:07 +00:00
clang-tools-extra [clangd] Unlink VFS working dir from OS working dir. Reland of r351051 2019-02-15 11:04:25 +00:00
compiler-rt [libFuzzer] form mode: add -ignore_crashes flag, honor the max_total_time flag, print the number of ooms/timeouts/crashes, fix a typo 2019-02-15 21:51:15 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
libcxx [libcxx] Do not assume the number of elements in a moved-from associative container 2019-02-13 16:43:44 +00:00
libcxxabi [CMake] Avoid passing -rtlib=compiler-rt when using compiler-rt 2019-02-12 01:35:29 +00:00
libunwind [CMake] Don't cache LLVM_MAIN_SRC_DIR 2019-02-13 07:09:26 +00:00
lld LLD/AMDGPU: Preserve ABI version during linking ELF for AMDGPU 2019-02-14 23:59:44 +00:00
lldb Revert "Don't include UnixSignals.h from Host." 2019-02-15 21:55:29 +00:00
llgo Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
llvm [X86] Don't set exception mask bits when modifying FPCW to change rounding mode for fp->int conversion 2019-02-15 21:59:33 +00:00
openmp [OpenMP] Fix broken link to browse sources 2019-02-12 17:00:57 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly [opaque pointer types] Update calls to CreateCall to pass the function 2019-02-08 19:30:46 +00:00
pstl [pstl] Remove some warnings when compiling with a recent Clang 2019-02-15 17:30:35 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

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