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
(cherry picked from commit 0177102173
)
This commit is contained in:
parent
05504819e3
commit
c8c2d908dd
@ -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