[llvm-commits] [llvm] r132023 - in /llvm/trunk: lib/Target/ARM/ARMAsmPrinter.cpp test/CodeGen/ARM/arm-modifier.ll
Eric Christopher
echristo at apple.com
Tue May 24 16:15:43 PDT 2011
Author: echristo
Date: Tue May 24 18:15:43 2011
New Revision: 132023
URL: http://llvm.org/viewvc/llvm-project?rev=132023&view=rev
Log:
Implement the immediate part of the 'B' modifier.
Part of rdar://9119939
Modified:
llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/trunk/test/CodeGen/ARM/arm-modifier.ll
Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=132023&r1=132022&r2=132023&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Tue May 24 18:15:43 2011
@@ -417,6 +417,10 @@
}
// Fallthrough to unsupported.
case 'B': // Bitwise inverse of integer or symbol without a preceding #.
+ if (!MI->getOperand(OpNum).isImm())
+ return true;
+ O << ~(MI->getOperand(OpNum).getImm());
+ return false;
case 'L': // The low 16 bits of an immediate constant.
case 'm': // The base register of a memory operand.
case 'M': // A register range suitable for LDM/STM.
Modified: llvm/trunk/test/CodeGen/ARM/arm-modifier.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/arm-modifier.ll?rev=132023&r1=132022&r2=132023&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/arm-modifier.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/arm-modifier.ll Tue May 24 18:15:43 2011
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm -mattr=+vfp2
+; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s
define i32 @foo(float %scale, float %scale2) nounwind ssp {
entry:
@@ -13,3 +13,11 @@
}
!0 = metadata !{i32 56, i32 89, i32 128, i32 168}
+
+define void @f0() nounwind ssp {
+entry:
+; CHECK: f0
+; CHECK: .word -1
+call void asm sideeffect ".word ${0:B} \0A\09", "i"(i32 0) nounwind, !srcloc !0
+ret void
+}
More information about the llvm-commits
mailing list