public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] need PPC asm. help. for 83xx watchdog
@ 2006-01-06 15:22 David Updegraff
  2006-01-06 15:36 ` Jerry Van Baren
  0 siblings, 1 reply; 3+ messages in thread
From: David Updegraff @ 2006-01-06 15:22 UTC (permalink / raw)
  To: u-boot

Hi.

Attempting to enable&use watchdog in 8343; but run into Assembler
(v.2.15) problem in cpu/mpc83xx/start.S:424
....
/* and reset it */
	li	r4, 0x556C
	sth	r4, SWSRR at l(r3)
	li	r4, 0xAA39    <-------- gas barks here, 0xAA39 > 0x8000
	sth	r4, SWSRR at l(r3)

which I do not understand, since I thought 'li' was an UNsigned 16bit
load. I can work around it in a kludgey way with.

	lis	r4, 0
	ori	r4, r4, 0xAA39
	sth	r4, SWSRR at l(r3)

but wonder if one you PowerPC assembler gurus could offer better suggestion.

Thanx.

-dbu.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] need PPC asm. help. for 83xx watchdog
  2006-01-06 15:22 [U-Boot-Users] need PPC asm. help. for 83xx watchdog David Updegraff
@ 2006-01-06 15:36 ` Jerry Van Baren
  2006-01-07 11:03   ` Pantelis Antoniou
  0 siblings, 1 reply; 3+ messages in thread
From: Jerry Van Baren @ 2006-01-06 15:36 UTC (permalink / raw)
  To: u-boot

David Updegraff wrote:
> Hi.
> 
> Attempting to enable&use watchdog in 8343; but run into Assembler
> (v.2.15) problem in cpu/mpc83xx/start.S:424
> ....
> /* and reset it */
> 	li	r4, 0x556C
> 	sth	r4, SWSRR at l(r3)
> 	li	r4, 0xAA39    <-------- gas barks here, 0xAA39 > 0x8000
> 	sth	r4, SWSRR at l(r3)
> 
> which I do not understand, since I thought 'li' was an UNsigned 16bit
> load. I can work around it in a kludgey way with.
> 
> 	lis	r4, 0
> 	ori	r4, r4, 0xAA39
> 	sth	r4, SWSRR at l(r3)
> 
> but wonder if one you PowerPC assembler gurus could offer better suggestion.
> 
> Thanx.
> 
> -dbu.

"li" is a simplified mnemonic which is actually "addi" (which 
sign-extends the immediate value) according to  the "PowerPC 
Microprocessor Family: The Programming Environments" Appendix F (p. F-15).

Why gas barks, I'm not quite sure.  Probably because it suspects you 
wanted it unsigned (which actually is the case - I hate it when tools 
are smarter than me).

gvb

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] need PPC asm. help. for 83xx watchdog
  2006-01-06 15:36 ` Jerry Van Baren
@ 2006-01-07 11:03   ` Pantelis Antoniou
  0 siblings, 0 replies; 3+ messages in thread
From: Pantelis Antoniou @ 2006-01-07 11:03 UTC (permalink / raw)
  To: u-boot

On Friday 06 January 2006 17:36, Jerry Van Baren wrote:
> David Updegraff wrote:
> > Hi.
> > 
> > Attempting to enable&use watchdog in 8343; but run into Assembler
> > (v.2.15) problem in cpu/mpc83xx/start.S:424
> > ....
> > /* and reset it */
> > 	li	r4, 0x556C
> > 	sth	r4, SWSRR at l(r3)
> > 	li	r4, 0xAA39    <-------- gas barks here, 0xAA39 > 0x8000
> > 	sth	r4, SWSRR at l(r3)
> > 
> > which I do not understand, since I thought 'li' was an UNsigned 16bit
> > load. I can work around it in a kludgey way with.
> > 
> > 	lis	r4, 0
> > 	ori	r4, r4, 0xAA39
> > 	sth	r4, SWSRR at l(r3)
> > 
> > but wonder if one you PowerPC assembler gurus could offer better suggestion.
> > 
> > Thanx.
> > 
> > -dbu.
> 
> "li" is a simplified mnemonic which is actually "addi" (which 
> sign-extends the immediate value) according to  the "PowerPC 
> Microprocessor Family: The Programming Environments" Appendix F (p. F-15).
> 
> Why gas barks, I'm not quite sure.  Probably because it suspects you 
> wanted it unsigned (which actually is the case - I hate it when tools 
> are smarter than me).
> 
> gvb
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 

Did you tried using li r4, 0xaa39 at l ?

Pantelis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-07 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-06 15:22 [U-Boot-Users] need PPC asm. help. for 83xx watchdog David Updegraff
2006-01-06 15:36 ` Jerry Van Baren
2006-01-07 11:03   ` Pantelis Antoniou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox