r270216 - [Hexagon] Recognize "s" constraint in inline-asm
Krzysztof Parzyszek via cfe-commits
cfe-commits at lists.llvm.org
Fri May 20 06:50:34 PDT 2016
Author: kparzysz
Date: Fri May 20 08:50:32 2016
New Revision: 270216
URL: http://llvm.org/viewvc/llvm-project?rev=270216&view=rev
Log:
[Hexagon] Recognize "s" constraint in inline-asm
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/CodeGen/hexagon-inline-asm.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=270216&r1=270215&r2=270216&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri May 20 08:50:32 2016
@@ -6039,6 +6039,9 @@ public:
return true;
}
break;
+ case 's':
+ // Relocatable constant.
+ return true;
}
return false;
}
Modified: cfe/trunk/test/CodeGen/hexagon-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/hexagon-inline-asm.c?rev=270216&r1=270215&r2=270216&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/hexagon-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/hexagon-inline-asm.c Fri May 20 08:50:32 2016
@@ -3,9 +3,15 @@
typedef int v64 __attribute__((__vector_size__(64)))
__attribute__((aligned(64)));
+int g;
+
void foo(v64 v0, v64 v1, v64 *p) {
+ int r;
v64 q0;
asm ("%0 = vgtw(%1.w,%2.w)" : "=q"(q0) : "v"(v0), "v"(v1));
// CHECK: call <16 x i32> asm "$0 = vgtw($1.w,$2.w)", "=q,v,v"(<16 x i32>{{.*}}, <16 x i32>{{.*}})
*p = q0;
+
+ asm ("%0 = memw(##%1)" : "=r"(r) : "s"(&g));
+// CHECK: call i32 asm "$0 = memw(##$1)", "=r,s"(i32* @g)
}
More information about the cfe-commits
mailing list