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