[cfe-commits] r136524 - in /cfe/trunk: lib/Basic/Targets.cpp test/CodeGen/arm-inline-asm.c
Eric Christopher
echristo at apple.com
Fri Jul 29 14:20:35 PDT 2011
Author: echristo
Date: Fri Jul 29 16:20:35 2011
New Revision: 136524
URL: http://llvm.org/viewvc/llvm-project?rev=136524&view=rev
Log:
Add support for the 'Q' arm memory constraint.
Fixes rdar://9866494
Added:
cfe/trunk/test/CodeGen/arm-inline-asm.c
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=136524&r1=136523&r2=136524&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Jul 29 16:20:35 2011
@@ -147,7 +147,7 @@
}
// If -ccc-host-triple arch-pc-win32-macho option specified, we're
- // generating code for Win32 ABI. No need to emit
+ // generating code for Win32 ABI. No need to emit
// __ENVIRONMENT_XX_OS_VERSION_MIN_REQUIRED__.
if (PlatformName == "win32") {
PlatformMinVersion = VersionTuple(Maj, Min, Rev);
@@ -2137,6 +2137,9 @@
case 'P': // VFP Floating point register double precision
Info.setAllowsRegister();
return true;
+ case 'Q': // A memory address that is a single base register.
+ Info.setAllowsMemory();
+ return true;
case 'U': // a memory reference...
switch (Name[1]) {
case 'q': // ...ARMV4 ldrsb
Added: cfe/trunk/test/CodeGen/arm-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm-inline-asm.c?rev=136524&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/arm-inline-asm.c (added)
+++ cfe/trunk/test/CodeGen/arm-inline-asm.c Fri Jul 29 16:20:35 2011
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
+
+void t1 (void *f, int g) {
+ // CHECK: call void asm "str $1, $0", "=*Q,r"
+ asm("str %1, %0" : "=Q"(f) : "r"(g));
+}
More information about the cfe-commits
mailing list