diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-10-07 18:49:46 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-10-07 18:49:46 +0000 |
commit | 16048332f149a1b8d2d34913230f79c8de66fa00 (patch) | |
tree | 56c8a30a42f4829d7c433b43c2282b2dd655a15c /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 0aafb58acadba8b7de3cc923d01203e0cf48b03b (diff) | |
download | llvm-16048332f149a1b8d2d34913230f79c8de66fa00.zip llvm-16048332f149a1b8d2d34913230f79c8de66fa00.tar.gz llvm-16048332f149a1b8d2d34913230f79c8de66fa00.tar.bz2 |
[mips] Fix definition of mfhi and mflo instructions to read from the whole
accumulator instead of its sub-registers, $hi and $lo.
We need this change to prevent a mflo following a mtlo from reading an
unpredictable/undefined value, as shown in the following example:
mult $6, $7 // result of $6 * $7 is written to $lo and $hi.
mflo $2 // read lower 32-bit result from $lo.
mtlo $4 // write to $lo. the content of $hi becomes unpredictable.
mfhi $3 // read higher 32-bit from $hi, which has an unpredictable value.
I don't have a test case for this change that reliably reproduces the problem.
llvm-svn: 192119
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions