* Simple question about powerpc kernel source. @ 2009-07-20 9:00 HongWoo Lee 2009-07-20 10:02 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 4+ messages in thread From: HongWoo Lee @ 2009-07-20 9:00 UTC (permalink / raw) To: linuxppc-dev Hi all, I have something to ask for the ppc kernel source. #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 Is ## used for concatenation. I'm not sure because it is just meaningless. If so what on earth is the result of concatenating ? And is there a good reference to understand powerpc asm ? I'm reading Power ISA, but I can't find @highest, @higher and ##. It would be good to know the reference book. Thanks in advance. Regards, HongWoo. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple question about powerpc kernel source. 2009-07-20 9:00 Simple question about powerpc kernel source HongWoo Lee @ 2009-07-20 10:02 ` Benjamin Herrenschmidt 2009-07-21 0:15 ` HongWoo Lee 0 siblings, 1 reply; 4+ messages in thread From: Benjamin Herrenschmidt @ 2009-07-20 10:02 UTC (permalink / raw) To: HongWoo Lee; +Cc: linuxppc-dev On Mon, 2009-07-20 at 18:00 +0900, HongWoo Lee wrote: > Hi all, > > I have something to ask for the ppc kernel source. > > #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 > > Is ## used for concatenation. I'm not sure because it is just meaningless. > If so what on earth is the result of concatenating ? > > And is there a good reference to understand powerpc asm ? > I'm reading Power ISA, but I can't find @highest, @higher and ##. > It would be good to know the reference book. You already asked pretty much the same question with the subject "Simple question about powerpc asm" and it was already replied to. Cheers, Ben. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple question about powerpc kernel source. 2009-07-20 10:02 ` Benjamin Herrenschmidt @ 2009-07-21 0:15 ` HongWoo Lee 2009-07-21 0:23 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 4+ messages in thread From: HongWoo Lee @ 2009-07-21 0:15 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: linuxppc-dev [-- Attachment #1: Type: text/plain, Size: 1611 bytes --] -------- Original Message -------- Subject: Re: Simple question about powerpc kernel source. From: Benjamin Herrenschmidt <benh@kernel.crashing.org> To: HongWoo Lee <hongwoo7@gmail.com> Cc: linuxppc-dev@lists.ozlabs.org Date: Mon Jul 20 2009 19:02:38 GMT+0900 > On Mon, 2009-07-20 at 18:00 +0900, HongWoo Lee wrote: > >> Hi all, >> >> I have something to ask for the ppc kernel source. >> >> #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 >> >> Is ## used for concatenation. I'm not sure because it is just meaningless. >> If so what on earth is the result of concatenating ? >> >> And is there a good reference to understand powerpc asm ? >> I'm reading Power ISA, but I can't find @highest, @higher and ##. >> It would be good to know the reference book. >> > > You already asked pretty much the same question with the subject "Simple > question about powerpc asm" and it was already replied to. > > Cheers, > Ben. > > > Thank you, Ben. 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. Regards, HongWoo. [-- Attachment #2: Type: text/html, Size: 2319 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple question about powerpc kernel source. 2009-07-21 0:15 ` HongWoo Lee @ 2009-07-21 0:23 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 4+ messages in thread From: Benjamin Herrenschmidt @ 2009-07-21 0:23 UTC (permalink / raw) To: HongWoo Lee; +Cc: linuxppc-dev 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@highest; ori rn,rn,.myfunction@higher; rldicr rn,rn,32,31; oris rn,rn,.myfunction@h; ori rn,rn,.myfunction@l > Which means putting the address of .myfunction into register rn. Cheers, Ben. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-21 0:23 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-20 9:00 Simple question about powerpc kernel source HongWoo Lee 2009-07-20 10:02 ` Benjamin Herrenschmidt 2009-07-21 0:15 ` HongWoo Lee 2009-07-21 0:23 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).