summaryrefslogtreecommitdiff
path: root/lib/Target/Blackfin/BlackfinInstrInfo.td
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-12 06:22:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-12 06:22:07 +0000
commitd6eb635d1a1317fc3d218056ec77ec242c2413cb (patch)
tree6596d9985a6e4370edbf4bb7343eb94c53ab4aff /lib/Target/Blackfin/BlackfinInstrInfo.td
parentdfc17f75e81250f3dcf06938f164481a77a50d60 (diff)
downloadllvm-d6eb635d1a1317fc3d218056ec77ec242c2413cb.tar.gz
llvm-d6eb635d1a1317fc3d218056ec77ec242c2413cb.tar.bz2
llvm-d6eb635d1a1317fc3d218056ec77ec242c2413cb.tar.xz
Move immediate constant predicate templates from the Blackfin target to MathExtras.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Blackfin/BlackfinInstrInfo.td')
-rw-r--r--lib/Target/Blackfin/BlackfinInstrInfo.td22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Target/Blackfin/BlackfinInstrInfo.td b/lib/Target/Blackfin/BlackfinInstrInfo.td
index b0a2cc13c4..934b18864c 100644
--- a/lib/Target/Blackfin/BlackfinInstrInfo.td
+++ b/lib/Target/Blackfin/BlackfinInstrInfo.td
@@ -63,24 +63,24 @@ def HI16 : SDNodeXForm<imm, [{
// Immediates
//===----------------------------------------------------------------------===//
-def imm3 : PatLeaf<(imm), [{return isImm<3>(N->getSExtValue());}]>;
-def uimm3 : PatLeaf<(imm), [{return isUimm<3>(N->getZExtValue());}]>;
-def uimm4 : PatLeaf<(imm), [{return isUimm<4>(N->getZExtValue());}]>;
-def uimm5 : PatLeaf<(imm), [{return isUimm<5>(N->getZExtValue());}]>;
+def imm3 : PatLeaf<(imm), [{return isInt<3>(N->getSExtValue());}]>;
+def uimm3 : PatLeaf<(imm), [{return isUint<3>(N->getZExtValue());}]>;
+def uimm4 : PatLeaf<(imm), [{return isUint<4>(N->getZExtValue());}]>;
+def uimm5 : PatLeaf<(imm), [{return isUint<5>(N->getZExtValue());}]>;
def uimm5m2 : PatLeaf<(imm), [{
uint64_t value = N->getZExtValue();
- return value % 2 == 0 && isUimm<5>(value);
+ return value % 2 == 0 && isUint<5>(value);
}]>;
def uimm6m4 : PatLeaf<(imm), [{
uint64_t value = N->getZExtValue();
- return value % 4 == 0 && isUimm<6>(value);
+ return value % 4 == 0 && isUint<6>(value);
}]>;
-def imm7 : PatLeaf<(imm), [{return isImm<7>(N->getSExtValue());}]>;
-def imm16 : PatLeaf<(imm), [{return isImm<16>(N->getSExtValue());}]>;
-def uimm16 : PatLeaf<(imm), [{return isUimm<16>(N->getZExtValue());}]>;
+def imm7 : PatLeaf<(imm), [{return isInt<7>(N->getSExtValue());}]>;
+def imm16 : PatLeaf<(imm), [{return isInt<16>(N->getSExtValue());}]>;
+def uimm16 : PatLeaf<(imm), [{return isUint<16>(N->getZExtValue());}]>;
def ximm16 : PatLeaf<(imm), [{
int64_t value = N->getSExtValue();
@@ -89,12 +89,12 @@ def ximm16 : PatLeaf<(imm), [{
def imm17m2 : PatLeaf<(imm), [{
int64_t value = N->getSExtValue();
- return value % 2 == 0 && isImm<17>(value);
+ return value % 2 == 0 && isInt<17>(value);
}]>;
def imm18m4 : PatLeaf<(imm), [{
int64_t value = N->getSExtValue();
- return value % 4 == 0 && isImm<18>(value);
+ return value % 4 == 0 && isInt<18>(value);
}]>;
// 32-bit bitmask transformed to a bit number