linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: asm in OF? YES!
@ 2000-08-31 22:41 Bruce Anderson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Anderson @ 2000-08-31 22:41 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: linuxppc-dev


On Thu, Aug 31, 2000 2:52 AM, Gabriel Paubert <mailto:paubert@iram.es>
wrote:
>
>You've just got to love OF portability across machines and architecture
>independance :-( Add to this the fact that I have somewhere a FirmWorks
>document which claims that on PPC the top of the stack is always in r28,
>r20/r21 are scratch registers. r31 is still the stack pointer (and r30 the
>return stack AFAIR).
>
>

Your asumption about OF portability is in error. Apple does not
use FirmWorks OF code.  Apple created their own "OF" version that
resembles FirmWorks OF vocabulary.



" Stamp out root logins .  .  .  . su "   --Bruce Anderson
 This message was created and sent using Cyberdog 2.0, MacOS 8.6,
 awk, find, sed, sendmail, sh, and NetBSD a free Multi-Platform OS.


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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: asm in OF?
@ 2000-08-30 14:05 Gabriel Paubert
  2000-08-30 21:38 ` asm in OF? YES! Michel Lanners
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Paubert @ 2000-08-30 14:05 UTC (permalink / raw)
  To: Michel Lanners; +Cc: linuxppc-dev


	Hi Michel,


> > All the OF I have seen had the capability to build new words in asm, with
> > a `code' definition IIRC. Maybe Apple's OF are crippled ?
>
> Apple's OF seems to have that capability as well (I think, guess and hope ;-).
> However, it does _not_ seem to have an assembler built-in. The 'code' word
> is defined all right.

You don't have any ppc-assembler vocabulary or similar, then ?

> When I do a 'see hido@', I only get:
>  >0 see hid0@ code hid0 ok
>  >0

Ok, how can something this close to the machine be delivered without an
assembler ?

> What I can do is look at the hex dump of the hid0@ word, and that gives me asm
> statements like for you (except that in Apple's OF, r20 holds the top stack
> item ;-). The fact that ' ' hid0@ dis' gives me a hex dump and not a
> disassembly is another evidence that Apple's OF doesn't know anything about
> asm....

Well, sincee you can type in hex, there is still some hope...

> > The syntax to build with an unknwown SPR is strange:
> > code ictc@
> > stwu r28,-4(r31)
> > 33f mfspr r28,*
> > bcctr 20,0
> >
> > generates the correct code, since I don't have ictc spr defined.
> > Otherwise mfspr 28,ictc might work.
>
> I will try this tonight, but I doubt I will be able to enter this as asm
> words. Do you know the alternate syntax? Would something lime this work:
>
> code 60000000 l, 6000000 l,

I think so, let me try:

ok code ictc@ ok 979ffffc l, 7f99faa6 l, 4e800420 l, ;code
ok see ictc@
code ictc@
edcc5c     stwu    r28,-4(r31)
edcc60     mfspr   r28,spr1017
edcc64     bcctr   always
ok ictc@ .
264d2
ok

It just works and returns garbage on a 603e, everytime a different value.

> as a sequence of 2 NOP's? How do you terminate a 'code' sequence?

Oops, forgot about it, my bad. With ';code', isn't it obvious ?

	Gabriel.


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

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

end of thread, other threads:[~2000-08-31 22:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-31 22:41 asm in OF? YES! Bruce Anderson
  -- strict thread matches above, loose matches on Subject: below --
2000-08-30 14:05 asm in OF? Gabriel Paubert
2000-08-30 21:38 ` asm in OF? YES! Michel Lanners
2000-08-31  7:52   ` Gabriel Paubert

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).