From 91ef849e6cb01a019dc50ed4e95c058e01616062 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Sat, 2 Aug 2008 19:42:36 +0000 Subject: Improved asm inline for hi,lo results Added hi,lo registers to be used,def implicitly. This provides better handle of instructions which use hi/lo. Fixes a small BranchAnalysis bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54274 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/MipsAsmPrinter.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/Target/Mips/MipsAsmPrinter.cpp') diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp index 9e334c15df..d53fd06d08 100644 --- a/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/MipsAsmPrinter.cpp @@ -59,6 +59,8 @@ namespace { } virtual std::string getSectionForFunction(const Function &F) const; + bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, const char *ExtraCode); void printOperand(const MachineInstr *MI, int opNum); void printMemOperand(const MachineInstr *MI, int opNum, const char *Modifier = 0); @@ -337,6 +339,19 @@ runOnMachineFunction(MachineFunction &MF) return false; } +// Print out an operand for an inline asm expression. +bool MipsAsmPrinter:: +PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, const char *ExtraCode) +{ + // Does this asm operand have a single letter operand modifier? + if (ExtraCode && ExtraCode[0]) + return true; // Unknown modifier. + + printOperand(MI, OpNo); + return false; +} + void MipsAsmPrinter:: printOperand(const MachineInstr *MI, int opNum) { -- cgit v1.2.3-70-g09d2