This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Intrinsics for PowerPC - Take 2



On Dec 29, 2003, at 1:23 PM, Segher Boessenkool wrote:


On 24-dec-03, at 6:58, Syd Polk wrote:
+/* { dg-do compile { target powerpc-*-* } } */
+/* { dg-options "-O0" } */
+
+/* (Test with -O0 so we don't optimize any of them away).  */
+
+/* Test PowerPC intrinsics.  */
+
+int
+main (void)
+{
+  /* Generic no-operand operations. */
+  __eieio();
+
+  return 0;
+}
+
+/* { dg-final { scan-assembler "\[ \t\]eieio" } } */


If eieio ever gets optimized away, there's something wrong with your implementation (unless it's in dead code, but that's not the case here).

Yes, you are correct. This test is designed to show that eieio gets spit out and not optimized away. I am not sure what you are asking me to do here.



Also, it doesn't make much sense to only have eieio, and not have dcbf, dcbst, dcbt, dcbtst, dcbz, dcbzl, icbi, isync, ldarx, lhbrx, lwarx, lwbrx, stdcx., sthbrx, stwbrx, stwcx., sync. And while you're at it, maybe also do mfspr, mftb, mtspr. And sc, td, tdi, tw, twi, for completeness (problem state only, of course).

You are correct here as well. There are many, many instructions on the list to add to builtins. My first patch proposal listed a bunch; I did not reproduce the list in my second patch.



Thanks and happy new year,



And you as well.



Segher



Syd Polk
Apple Computer
Technology EPM, Mac OS X Development Tools
+1 408 974-0577


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]