[llvm-commits] [llvm] r51904 - /llvm/trunk/lib/CodeGen/AsmPrinter.cpp
Dale Johannesen
dalej at apple.com
Wed Jun 4 11:07:51 PDT 2008
Hi Scott, this broke a bunch of tests in the gcc testsuite that are
looking for specific patterns in the .s file:
Tests that now fail, but worked before:
objc.dg/const-cfstring-4-64bit.m scan-assembler .quad
\t___CFConstantStringClassReference\n\t.long\t1992\n\t.space( |\t)4\n
\t.quad\t.*\n\t.quad\t19\n
objc.dg/const-cfstring-4.m scan-assembler .long
\t___CFConstantStringClassReference\n\t.long\t1992\n\t.long\t.*\n
\t.long\t19\n
objc.dg/const-str-10-64bit.m scan-assembler .quad
\t__NSConstantStringClassReference\n\t.quad\t.*\n\t.long\t5\n
\t.space( |\t)4\n
objc.dg/const-str-10.m scan-assembler .long
\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n
objc.dg/const-str-11-64bit.m scan-assembler .quad\t__XStrClassReference
\n\t.quad\t.*\n\t.long\t5\n\t.space( |\t)4\n
objc.dg/const-str-11.m scan-assembler .long\t__XStrClassReference\n
\t.long\t.*\n\t.long\t5\n
objc.dg/const-str-9-64bit.m scan-assembler .quad
\t__NSConstantStringClassReference\n\t.quad\t.*\n\t.long\t5\n
\t.space( |\t)4\n
objc.dg/const-str-9.m scan-assembler .long
\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n
objc.dg/next-runtime-1.m scan-assembler L_OBJC_MODULES:.*\n[ \t]*.long
\t7\n
objc.dg/objc2-protocol-ext-1.m scan-assembler .long\t72\n\t.(long\t0|
space\t4)
objc.dg/symtab-1-64bit.m scan-assembler L_OBJC_SYMBOLS.*:.*\n\t(.quad
\t0|.space\t8)\n\t(.long\t0\n\t.space 4|.space\t8)\n\t.(short|word)
\t2\n\t.((short|word)\t0|space\t2)\n\t.space( |\t)4\n\t.quad
\tL_OBJC_CLASS_Derived.*\n\t.quad\tL_OBJC_CLASS_Base.*\n
objc.dg/symtab-1.m scan-assembler L_OBJC_SYMBOLS.*:.*\n\t(.long
\t0|.space\t4)\n\t(.long\t0|.space\t4)\n\t.(short|word)\t2\n\t.((short|
word)\t0|space\t2)\n\t.long\tL_OBJC_CLASS_Derived.*\n\t.long
\tL_OBJC_CLASS_Base.*\n
Tests that now fail, but worked before:
obj-c++.dg/const-cfstring-4-64bit.mm scan-assembler .quad
\t___CFConstantStringClassReference\n\t.long\t1992\n\t.space( |\t)4\n
\t.quad\t.*\n\t.quad\t19\n
obj-c++.dg/const-cfstring-4.mm scan-assembler .long
\t___CFConstantStringClassReference\n\t.long\t1992\n\t.long\t.*\n
\t.long\t19\n
obj-c++.dg/const-str-10.mm scan-assembler .long
\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n
obj-c++.dg/const-str-11.mm scan-assembler .long\t__XStrClassReference\n
\t.long\t.*\n\t.long\t5\n
obj-c++.dg/const-str-9.mm scan-assembler .long
\t__NSConstantStringClassReference\n\t.long\t.*\n\t.long\t5\n
obj-c++.dg/objc2-protocol-ext-1.mm scan-assembler .long\t72\n\t.(long
\t0|space\t4)
Would you mind dealing with these? Here's one example of how:
Index: const-cfstring-4-64bit.m
===================================================================
--- const-cfstring-4-64bit.m (revision 51948)
+++ const-cfstring-4-64bit.m (working copy)
@@ -9,4 +9,4 @@
/* { dg-final { scan-assembler ".section __DATA, __cfstring" } } */
/* LLVM LOCAL accept llvm syntax */
-/* { dg-final { scan-assembler ".quad
\t___CFConstantStringClassReference\n\t.long\t1992\n\t.space( |\t)4\n
\t.quad\t.*\n\t.quad\t19\n" } } */
+/* { dg-final { scan-assembler ".quad
\t___CFConstantStringClassReference\n\t.long\t1992(\t\t\t## 0x7C8)?\n
\t.space( |\t)4\n\t.quad\t.*\n\t.quad\t19\n" } } */
On Jun 3, 2008, at 8:39 AM, Scott Michel wrote:
> Author: pingbak
> Date: Tue Jun 3 10:39:51 2008
> New Revision: 51904
>
> URL: http://llvm.org/viewvc/llvm-project?rev=51904&view=rev
> Log:
> Find a better place to output hex constants corresponding to integers.
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter.cpp
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter.cpp?rev=51904&r1=51903&r2=51904&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Tue Jun 3 10:39:51 2008
> @@ -1074,6 +1074,11 @@
> const Type *type = CV->getType();
> printDataDirective(type);
> EmitConstantValueOnly(CV);
> + if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
> + O << "\t\t\t"
> + << TAI->getCommentString()
> + << " 0x" << CI->getValue().toStringUnsigned(16);
> + }
> O << "\n";
> }
More information about the llvm-commits
mailing list