summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-05-18 17:39:35 +0000
committerEric Christopher <echristo@apple.com>2012-05-18 17:39:35 +0000
commit9ca26cfb5fb5b334d886a0ca211220a48f34b00d (patch)
tree451fc6667061fbe828562a159be821d3d33e962d /llvm/lib/Target/Mips/MipsAsmPrinter.cpp
parentd78d7b05ae3c42e228f41132090161e753bc103a (diff)
downloadbcm5719-llvm-9ca26cfb5fb5b334d886a0ca211220a48f34b00d.tar.gz
bcm5719-llvm-9ca26cfb5fb5b334d886a0ca211220a48f34b00d.zip
Add support for the mips 'x' inline asm modifier.
Patch by Jack Carter. llvm-svn: 157057
Diffstat (limited to 'llvm/lib/Target/Mips/MipsAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsAsmPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index e62da355eff..3fa773b856c 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -383,6 +383,11 @@ bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
return true;
O << "0x" << StringRef(utohexstr(MO.getImm())).lower();
return false;
+ case 'x': // hex const int (low 16 bits)
+ if ((MO.getType()) != MachineOperand::MO_Immediate)
+ return true;
+ O << "0x" << StringRef(utohexstr(MO.getImm() & 0xffff)).lower();
+ return false;
}
}
OpenPOWER on IntegriCloud