diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-08-02 19:42:36 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-08-02 19:42:36 +0000 |
| commit | 91ef849e6cb01a019dc50ed4e95c058e01616062 (patch) | |
| tree | fa040b67cabadc98d4ed22ae044ff1a44fe0dce4 /lib/Target/Mips/MipsAsmPrinter.cpp | |
| parent | 1906c5a63b1b6f32c3f5a0ed9261144bc1ddbc3a (diff) | |
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
Diffstat (limited to 'lib/Target/Mips/MipsAsmPrinter.cpp')
| -rw-r--r-- | lib/Target/Mips/MipsAsmPrinter.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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) { |
