Simple question about powerpc kernel source.
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Jul 21 10:23:46 EST 2009
On Tue, 2009-07-21 at 09:15 +0900, HongWoo Lee wrote:
> First, I aleady understood about @highest, @higher, @h and @l.
> For now, what I want to know is about "##" in the below code.
>
> #define LOADADDR(rn,name) \
> lis rn,name##@highest; \
> ori rn,rn,name##@higher; \
> rldicr rn,rn,32,31; \
> oris rn,rn,name##@h; \
> ori rn,rn,name##@l
>
> And I don't want to ask every detail.
> So I want to know the manual or document which describes the detail.
Well, it's just concatenation...
Ie, if you do LOADADDR(rn, .myfunction) it will turn to
lis rn,.myfunction at highest;
ori rn,rn,.myfunction at higher;
rldicr rn,rn,32,31;
oris rn,rn,.myfunction at h;
ori rn,rn,.myfunction at l
>
Which means putting the address of .myfunction into register rn.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list