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 | 243702b95a471ffb7d2374dfad3d7f8b11bee7e7 (patch) | |
tree | ab2d61d1494d5822ce311f09c9f00add40957013 /lib/Transforms | |
parent | 379f76e873b91550e3d9cee79dff814e3ce1e86e (diff) | |
download | llvm-243702b95a471ffb7d2374dfad3d7f8b11bee7e7.tar.gz llvm-243702b95a471ffb7d2374dfad3d7f8b11bee7e7.tar.bz2 llvm-243702b95a471ffb7d2374dfad3d7f8b11bee7e7.tar.xz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
0 files changed, 0 insertions, 0 deletions