diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2022-08-10 21:40:22 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2022-08-10 21:40:22 +0000 |
commit | a61bbc3023c57716d097bccbf93ba8c87872909a (patch) | |
tree | bb778cb504c587657388122818df910b46bf2363 | |
parent | 408f816fe945b013ca3f7b5aaf41cea986531b26 (diff) | |
download | ports-a61bbc3023c57716d097bccbf93ba8c87872909a.tar.gz ports-a61bbc3023c57716d097bccbf93ba8c87872909a.zip |
cad/nvc: fix off by one for powerpc*
There are actually 32 GPR for POWER.
-rw-r--r-- | cad/nvc/files/patch-thirdparty_cpustate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cad/nvc/files/patch-thirdparty_cpustate.c b/cad/nvc/files/patch-thirdparty_cpustate.c index 074770c7d712..f78ac6e70192 100644 --- a/cad/nvc/files/patch-thirdparty_cpustate.c +++ b/cad/nvc/files/patch-thirdparty_cpustate.c @@ -9,7 +9,7 @@ + cpu->pc = uc->uc_mcontext.mc_srr0; + cpu->sp = uc->uc_mcontext.mc_gpr[1]; + -+ for (int i = 0; i < 31; i++) ++ for (int i = 0; i < 32; i++) + cpu->regs[i] = uc->uc_mcontext.mc_gpr[i]; #elif defined __OpenBSD__ && defined __x86_64__ cpu->pc = uc->sc_rip; |