summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsISelLowering.h
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-10-07 18:49:46 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-10-07 18:49:46 +0000
commit243702b95a471ffb7d2374dfad3d7f8b11bee7e7 (patch)
treeab2d61d1494d5822ce311f09c9f00add40957013 /lib/Target/Mips/MipsISelLowering.h
parent379f76e873b91550e3d9cee79dff814e3ce1e86e (diff)
downloadllvm-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/Target/Mips/MipsISelLowering.h')
-rw-r--r--lib/Target/Mips/MipsISelLowering.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.h b/lib/Target/Mips/MipsISelLowering.h
index aa4bcc9721..171c08c3b3 100644
--- a/lib/Target/Mips/MipsISelLowering.h
+++ b/lib/Target/Mips/MipsISelLowering.h
@@ -70,7 +70,8 @@ namespace llvm {
EH_RETURN,
// Node used to extract integer from accumulator.
- ExtractLOHI,
+ ExtractHI,
+ ExtractLO,
// Node used to insert integers to accumulator.
InsertLOHI,