What does instruction LA mean?

3 messages, 3 authors, 2001-03-29 · open the first message on its own page

What does instruction LA mean?

From: Jones Madhuri <hidden>
Date: 2001-03-28 05:32:51

Hello,

I am novice in Power PC assembly code and I am trying
compile in following code (written by someone else)
into head_8xx.S.

This function has instruction like

mfspr r3, IC_CST
LA r4, IC_CST_LEN

However the hardhat assembler doesn't understand the
mnemonic LA, is LA same as add immediate instruction?
addi r4, r4, IC_CST_LEN

Please help!!

Thanks.

M.J.

Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: What does instruction LA mean?

From: Dan Malek <hidden>
Date: 2001-03-28 06:19:10

Jones Madhuri wrote:
I am novice in Power PC assembly code and I am trying
compile in following code (written by someone else)
into head_8xx.S.
Novice or otherwise, you shouldn't be placing any code in
head_8xx.S.  It's a guarantee you won't get Linux to boot.

mfspr r3, IC_CST
LA r4, IC_CST_LEN

However the hardhat assembler doesn't understand the
mnemonic LA,
Because there is no such instruction.  It looks like a
macro that will result in the two instruction pair:
	lis	r4, IC_CST_LEN@h
	ori	r4, r4, IC_CST_LEN@l

You shouldn't be messing around with those cache
management registers......


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: What does instruction LA mean?

From: Srinivas Rao.M <hidden>
Date: 2001-03-29 04:06:48

hi madhuri,
 	The LA here is a macro. I am not sure about the linux. but in the
pSOS+ i have seen a macro written in assembly language, which does the
'loading of address to a register' job.

Just check the assembly source files, you may find macro something like this.

  .macro    LA reg,symbol
  lis       reg,%hiadj(symbol)
  addi      reg,reg,%lo(symbol)
  .endm


such macros are written to load the value(constant) in to a register.

cheers,
srini...


On Tue, 27 Mar 2001, Jones Madhuri wrote:
Hello,

I am novice in Power PC assembly code and I am trying
compile in following code (written by someone else)
into head_8xx.S.

This function has instruction like

mfspr r3, IC_CST
LA r4, IC_CST_LEN

However the hardhat assembler doesn't understand the
mnemonic LA, is LA same as add immediate instruction?
addi r4, r4, IC_CST_LEN

Please help!!

Thanks.

M.J.

Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
--

We are responsible for what we are, and whatever we wish ourselves to be, we
have the power to make ourselves. If what we are now has been the result of
our own past actions, it certainly follows that whatever we wish to be in
future can be produced by our present actions; so we have to know how to act.
-Swami Vivekananda


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help