aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PIC16/PIC16InstrInfo.h
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-05-06 08:02:01 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-05-06 08:02:01 +0000
commitd8d27f4a4b9461aee581217691d896d4eba985fa (patch)
tree916a5fc438149ce87d232613666195a754daa281 /lib/Target/PIC16/PIC16InstrInfo.h
parent7af1c78b98d2df7d0ab9154461ca3d835706716e (diff)
downloadexternal_llvm-d8d27f4a4b9461aee581217691d896d4eba985fa.zip
external_llvm-d8d27f4a4b9461aee581217691d896d4eba985fa.tar.gz
external_llvm-d8d27f4a4b9461aee581217691d896d4eba985fa.tar.bz2
Emit banksel and movlp instructions.
Split large global data (both initialized and un-initialized) into multiple sections of <= 80 bytes. Provide routines to manage PIC16 ABI naming conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16InstrInfo.h')
-rw-r--r--lib/Target/PIC16/PIC16InstrInfo.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Target/PIC16/PIC16InstrInfo.h b/lib/Target/PIC16/PIC16InstrInfo.h
index 04927b7..60b02ab 100644
--- a/lib/Target/PIC16/PIC16InstrInfo.h
+++ b/lib/Target/PIC16/PIC16InstrInfo.h
@@ -64,6 +64,23 @@ public:
unsigned &SrcReg, unsigned &DstReg,
unsigned &SrcSubIdx, unsigned &DstSubIdx) const;
+ static inline bool hasNoMemOperand (const MachineInstr &MI) {
+
+ if (MI.getNumOperands() == 0) return true;
+
+ switch (MI.getOpcode()) {
+ default: return false; // Beware
+ case PIC16::movlw_lo_1:
+ case PIC16::movlw_hi_1:
+ case PIC16::movlw_lo_2:
+ case PIC16::movlw_hi_2:
+ return true;
+ }
+ }
+
+
+
+
};
} // namespace llvm