emulate_branch.3
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 63 行
3
63 行
.TH emulate_branch 3 RISC.SH Nameemulate_branch, execute_branch \- branch emulation.SH Syntax.nf.B #include <signal.h>.PP.B emulate_branch(\fIscp, branch_instruction\fP).B struct sigcontext *\fIscp\fP;.B unsigned long \fIbranch_instruction\fP;.PP.B execute_branch(\fIbranch_instruction\fP).B unsigned long \fIbranch_instruction\fP;.fi.SH DescriptionThe.PN emulate_branch function is passed a signal context structure and abranch instruction. It emulates the branch based on theregister values in the signal context structure. Itmodifies the value of the program counter in the signalcontext structure.RI ( sc_pc )to the target of the \fIbranch_instruction\fP. The program counter must initially be pointingat the branch and the register values must be those at thetime of the branch. If the branch is not taken the programcounter is advanced to point to the instruction after thedelay slot.RI ( sc_pc+= 8)..PPIf the branch instruction is a `branch on coprocessor 2' or `branch on coprocessor 3'instruction,.PN emulate_branchcalls.PN execute_branch to execute the branch in data space todetermine if it is taken or not..SH Return ValuesThe.PN emulate_branchfunction returns a 0 if the branch was emulatedsuccessfully. A non-zero value indicates the value passedas a branch instruction was not a branch instruction..PPThe.PN execute_branchfunction returns non-zero on taken branches and zeroon non-taken branches..SH RestrictionsSince .PN execute_branch is only intended to be used by.PN emulate_branch it does not check its parameter to see if infact it is a branch instruction. It is really a stop gap incase a coprocessor is added without the kernel fullysupporting it (which is unlikely)..SH See Alsocacheflush(2), sigvec(2), signal(3)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?