[PATCH] D43021: Recognize a buch of CPU/NetBSD ports of GetPcSpBp()
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 08:19:27 PST 2018
ro added a comment.
I'm not sure I like it this way: the patch seems extremely repetive to me. Couldn't this just (with the exception of sparc/sparcv9) define a common macro
for the bp register number and then do
*pc = _UC_MACHINE_PC(ucontext);
*sp = _UC_MACHINE_SP(ucontext);
*bp = ucontext->uc_mcontext.__gregs[_REG_BP];
Maybe even factor out
ucontext_t *ucontext = (ucontext_t*)context;
in all cases?
Another nit (while you are fixing inconsistencies): we have both ```(ucontext_t*)``` and ```(ucontext_t *)``` (i.e. with and without a space) in casts.
Repository:
rL LLVM
https://reviews.llvm.org/D43021
More information about the llvm-commits
mailing list