Subject: ppc equivalent to x86 stack asm instructions?
To: None <>
From: None <>
List: port-powerpc
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:

#ifdef __386BSD__
        .file   "setsp.s"
        .globl  _setstack
        movl    %esp, %ebp
        movl    _newstackptr, %esp
        jmp     *(%ebp)
        .align  4

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[0].__jmpbuf[JB_PC])
#define TNOS_SP(p) (p->env[0].__jmpbuf[JB_SP])

I tried this:
#define TNOS_PC(p) (p->env[0].__jmpbuf[JB_LR])
#define TNOS_SP(p) (p->env[0].__jmpbuf[JB_GPR1])

But it didn't work.

Thanks for any clues....