diff options
-rw-r--r-- | lib/Basic/Targets.cpp | 5 | ||||
-rw-r--r-- | test/CodeGen/arm-inline-asm.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 3aebc41d71..48a32caad3 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -147,7 +147,7 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts, } // 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 @@ public: 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 diff --git a/test/CodeGen/arm-inline-asm.c b/test/CodeGen/arm-inline-asm.c new file mode 100644 index 0000000000..0152b050fd --- /dev/null +++ b/test/CodeGen/arm-inline-asm.c @@ -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)); +} |