[PATCH] ppc32 dl-machine.c
Steve Munroe
sjmunroe@us.ibm.com
Wed Sep 25 12:06:00 GMT 2002
Geoff Keating writes:
> The original proposed patch was something like:
>
> --- glibc-2.2.5/sysdeps/powerpc/dl-machine.c~ Sun Sep 9 07:21:34
> 2001
> +++ glibc-2.2.5/sysdeps/powerpc/dl-machine.c Fri May 10 12:58:04
> 2002
> @@ -311,7 +311,8 @@
> PPC_DCBST (plt + i);
> PPC_DCBST (plt + size_modified - 1);
> PPC_SYNC;
> - PPC_ICBI (plt);
> + for (i = 0; i < size_modified; i += 4)
> + PPC_ICBI (plt + i);
> PPC_ICBI (plt + size_modified - 1);
> PPC_ISYNC;
> }
>
> your patch looks much less efficient. Can you explain the
> differences?
>
> Please remember, PPC_SYNC is a very expensive operation. It
> requires a bus broadcast and therefore takes tens of cycles.
The patch above did give me enough context to see that there should be two
separate "for loops" (one for DCBST and one ICBI).
I'll make the change, test, and resubmit.
More information about the Libc-alpha
mailing list