[llvm-branch-commits] [cfe-branch] r111414 - in /cfe/branches/Apple/williamson: lib/Basic/Targets.cpp lib/Basic/Targets.cpp.orig test/CodeGen/asm_arm.c
Daniel Dunbar
daniel at zuster.org
Wed Aug 18 13:33:44 PDT 2010
Author: ddunbar
Date: Wed Aug 18 15:33:44 2010
New Revision: 111414
URL: http://llvm.org/viewvc/llvm-project?rev=111414&view=rev
Log:
Merge r110774:
--
Author: Daniel Dunbar <daniel at zuster.org>
Date: Wed Aug 11 02:17:11 2010 +0000
ARM: Swap which registers we consider real / aliases to match LLVM and llvm-gcc.
Added:
cfe/branches/Apple/williamson/lib/Basic/Targets.cpp.orig
- copied, changed from r111413, cfe/branches/Apple/williamson/lib/Basic/Targets.cpp
Modified:
cfe/branches/Apple/williamson/lib/Basic/Targets.cpp
cfe/branches/Apple/williamson/test/CodeGen/asm_arm.c
Modified: cfe/branches/Apple/williamson/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/Basic/Targets.cpp?rev=111414&r1=111413&r2=111414&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/Basic/Targets.cpp (original)
+++ cfe/branches/Apple/williamson/lib/Basic/Targets.cpp Wed Aug 18 15:33:44 2010
@@ -1773,17 +1773,16 @@
const char * const ARMTargetInfo::GCCRegNames[] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
+ "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc"
};
void ARMTargetInfo::getGCCRegNames(const char * const *&Names,
- unsigned &NumNames) const {
+ unsigned &NumNames) const {
Names = GCCRegNames;
NumNames = llvm::array_lengthof(GCCRegNames);
}
const TargetInfo::GCCRegAlias ARMTargetInfo::GCCRegAliases[] = {
-
{ { "a1" }, "r0" },
{ { "a2" }, "r1" },
{ { "a3" }, "r2" },
@@ -1797,9 +1796,9 @@
{ { "sl" }, "r10" },
{ { "fp" }, "r11" },
{ { "ip" }, "r12" },
- { { "sp" }, "r13" },
- { { "lr" }, "r14" },
- { { "pc" }, "r15" },
+ { { "r13" }, "sp" },
+ { { "r14" }, "lr" },
+ { { "r15" }, "pc" },
};
void ARMTargetInfo::getGCCRegAliases(const GCCRegAlias *&Aliases,
Copied: cfe/branches/Apple/williamson/lib/Basic/Targets.cpp.orig (from r111413, cfe/branches/Apple/williamson/lib/Basic/Targets.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/Basic/Targets.cpp.orig?p2=cfe/branches/Apple/williamson/lib/Basic/Targets.cpp.orig&p1=cfe/branches/Apple/williamson/lib/Basic/Targets.cpp&r1=111413&r2=111414&rev=111414&view=diff
==============================================================================
(empty)
Modified: cfe/branches/Apple/williamson/test/CodeGen/asm_arm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/test/CodeGen/asm_arm.c?rev=111414&r1=111413&r2=111414&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/test/CodeGen/asm_arm.c (original)
+++ cfe/branches/Apple/williamson/test/CodeGen/asm_arm.c Wed Aug 18 15:33:44 2010
@@ -30,3 +30,11 @@
"vst1.32 {q4}, [%0,:128] \n\t"
:: "r"(a), "r"(b));
}
+
+// {sp, lr, pc} are the canonical names for {r13, r14, r15}.
+//
+// CHECK: @test5
+// CHECK: call void asm sideeffect "", "~{sp},~{lr},~{pc},~{sp},~{lr},~{pc}"()
+void test5() {
+ __asm__("" : : : "r13", "r14", "r15", "sp", "lr", "pc");
+}
More information about the llvm-branch-commits
mailing list