[PATCH 10/11] powerpc: Add helper functions for synthesising instructions at runtime

Michael Ellerman michael at ellerman.id.au
Tue Oct 18 15:39:42 EST 2005


On Tue, 18 Oct 2005 00:44, Segher Boessenkool wrote:
> > +typedef enum {
> > +	BRANCH_RELATIVE,
> > +	BRANCH_RELATIVE_LINK,
> > +	BRANCH_ABSOLUTE,
> > +	BRANCH_ABSOLUTE_LINK
> > +} branch_t;
>
> Why not say BRANCH_RELATIVE = 0, BRANCH_RELATIVE_LINK = 1, etc.,
> and then later just or this value into the insn?

I thought that might be too tricky, but perhaps you're right.

> > +	asm ("dcbst 0, %0; sync; icbi 0,%0; isync" : : "r" (p));
>
> sequence should be  dcbst; sync; icbi; sync; isync  to ensure
> the insn cache invalidation is global before continuing.

Oops, thanks. I just copied that from somewhere. I'll fix it up.

cheers

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person



More information about the Linuxppc64-dev mailing list