aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsSubtarget.h
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-05-22 03:10:09 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-05-22 03:10:09 +0000
commit18f3c7809292fe6ebdce47d551f23d6ee216023f (patch)
tree5c81076eade0a78b0bcc4f4d4db78b0c2673c954 /lib/Target/Mips/MipsSubtarget.h
parenta7a2a3635f2fbe46d7d9074798e79e853f69d40b (diff)
This patch adds a predicate to existing mips32 and mips64 so that those
instruction encodings can be excluded during mips16 processing. This revision fixes the issue raised by Jim Grosbach. bool hasStandardEncoding() const { return !inMips16Mode(); } When micromips is added it will be bool StandardEncoding() const { return !inMips16Mode()&& !inMicroMipsMode(); } No additional testing is needed other than to assure that there is no regression from this patch. Patch by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsSubtarget.h')
-rw-r--r--lib/Target/Mips/MipsSubtarget.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsSubtarget.h b/lib/Target/Mips/MipsSubtarget.h
index 4c8bdde904..3215c44be0 100644
--- a/lib/Target/Mips/MipsSubtarget.h
+++ b/lib/Target/Mips/MipsSubtarget.h
@@ -130,6 +130,8 @@ public:
bool inMips16Mode() const { return InMips16Mode; }
bool isLinux() const { return IsLinux; }
+ bool hasStandardEncoding() const { return !inMips16Mode(); }
+
/// Features related to the presence of specific instructions.
bool hasSEInReg() const { return HasSEInReg; }
bool hasCondMov() const { return HasCondMov; }