Subject: ppc equivalent to x86 stack asm instructions?
To: None <port-powerpc@NetBSD.org>
From: None <email@example.com>
Date: 11/30/2003 21:34:09
I'm trying to compile a program called tnos which will allow me to do
ax25 (ham tcp/ip) on netbsd. I'm running into a problem with some weird
code it uses to manipulate the stack (involved in some sort of longjump()
The relevant code:
movl %esp, %ebp
movl _newstackptr, %esp
Can someone translate this to ppc asm for me please?
Alternately, there is a different chunk of code which does the same thing
inline (but for linux). It's defines are:
#define TNOS_PC(p) (p->env.__jmpbuf[JB_PC])
#define TNOS_SP(p) (p->env.__jmpbuf[JB_SP])
I tried this:
#define TNOS_PC(p) (p->env.__jmpbuf[JB_LR])
#define TNOS_SP(p) (p->env.__jmpbuf[JB_GPR1])
But it didn't work.
Thanks for any clues....