diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2021-11-03 19:34:52 +0700 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2021-11-12 12:00:09 +0700 |
commit | 3057e850b88e8faf754db02293066e1182da2954 (patch) | |
tree | faeb0a68f042418986b18cc71f16ce748c3091af /lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h | |
parent | 835135a8aee5557001ce8316629ebd4166ce8648 (diff) | |
download | llvm-3057e850b88e8faf754db02293066e1182da2954.zip llvm-3057e850b88e8faf754db02293066e1182da2954.tar.gz llvm-3057e850b88e8faf754db02293066e1182da2954.tar.bz2 |
[X86] Preserve FPSW when popping x87 stack
When compiler converts x87 operations to stack model, it may insert
instructions that pop top stack element. To do it the compiler inserts
instruction FSTP right after the instruction that calculates value on
the stack. It can break the code that uses FPSW set by the last
instruction. For example, an instruction FXAM is usually followed by
FNSTSW, but FSTP is inserted after FXAM. As FSTP leaves condition code
in FPSW undefined, the compiler produces incorrect code.
With this change FSTP in inserted after the FPSW consumer if the last
instruction sets FPSW.
Differential Revision: https://reviews.llvm.org/D113335
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h')
0 files changed, 0 insertions, 0 deletions