Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ emulate_branch(3) — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought



EMULATEBRANCH(3)   RISC/os Reference Manual    EMULATEBRANCH(3)



NAME
     emulate_branch - MIPS branch emulation

SYNOPSIS
     #include <signal.h>

     emulatebranch(scp, branchinstruction)
     struct sigcontext *scp;
     unsigned long branchinstruction;

DESCRIPTION
     emulatebranch is passed a signal context structure and a
     branch instruction.  It emulates the branch based on the
     register values in the signal context structure.  It modi-
     fies the value of the program counter in the signal context
     structure (sc_pc) to the target of the branch instruction.
     The program counter must initially be pointing at the branch
     and the register values must be those at the time of the
     branch.  If the branch is not taken the program counter is
     advanced to point to the instruction after the delay slot
     (sc_pc += 8).

     In the case the branch instruction is a branch on coproces-
     sor 2 or 3 instruction emulatebranch can't emulate or exe-
     cute the branch currently.

RETURN VALUE
     emulatebranch returns a 0 if the branch was emulated suc-
     cessfully.  An non-zero value indicates the value passed as
     a branch instruction was not a branch instruction.

ALSO SEE
     signal(2), sigset(2)






















                        Printed 11/19/92                   Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026