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 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).

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).

Thanks and happy new year,


Segher



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