arm64, riscv: Fix TRAF_PC() to return the PC, not the return address.
Reviewed by: mhorne Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D31969
This commit is contained in:
parent
c76da1f010
commit
0177102173
@ -45,7 +45,7 @@
|
||||
#include <machine/frame.h>
|
||||
#include <machine/armreg.h>
|
||||
|
||||
#define TRAPF_PC(tfp) ((tfp)->tf_lr)
|
||||
#define TRAPF_PC(tfp) ((tfp)->tf_elr)
|
||||
#define TRAPF_USERMODE(tfp) (((tfp)->tf_spsr & PSR_M_MASK) == PSR_M_EL0t)
|
||||
|
||||
#define cpu_getstack(td) ((td)->td_frame->tf_sp)
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <machine/cpufunc.h>
|
||||
#include <machine/frame.h>
|
||||
|
||||
#define TRAPF_PC(tfp) ((tfp)->tf_ra)
|
||||
#define TRAPF_PC(tfp) ((tfp)->tf_sepc)
|
||||
#define TRAPF_USERMODE(tfp) (((tfp)->tf_sstatus & SSTATUS_SPP) == 0)
|
||||
|
||||
#define cpu_getstack(td) ((td)->td_frame->tf_sp)
|
||||
|
Loading…
Reference in New Issue
Block a user