From 91914b23f69ce2863ba1cca90f2a9fc69ad2675b Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 12 Aug 2023 14:29:02 +0200 Subject: [PATCH] DynASM: Fix regression due to warning fix. Thanks to Dmitry Stogov. #1041 #970 --- dynasm/dasm_arm.h | 1 + dynasm/dasm_arm64.h | 1 + dynasm/dasm_mips.h | 1 + dynasm/dasm_ppc.h | 1 + dynasm/dasm_x86.h | 1 + 5 files changed, 5 insertions(+) diff --git a/dynasm/dasm_arm.h b/dynasm/dasm_arm.h index aa16014e..4570cd12 100644 --- a/dynasm/dasm_arm.h +++ b/dynasm/dasm_arm.h @@ -142,6 +142,7 @@ void dasm_setup(Dst_DECL, const void *actionlist) if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); + D->sections[i].rbuf = D->sections[i].buf - D->sections[i].pos; D->sections[i].ofs = 0; } } diff --git a/dynasm/dasm_arm64.h b/dynasm/dasm_arm64.h index e04898f1..dffd64e8 100644 --- a/dynasm/dasm_arm64.h +++ b/dynasm/dasm_arm64.h @@ -144,6 +144,7 @@ void dasm_setup(Dst_DECL, const void *actionlist) if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); + D->sections[i].rbuf = D->sections[i].buf - D->sections[i].pos; D->sections[i].ofs = 0; } } diff --git a/dynasm/dasm_mips.h b/dynasm/dasm_mips.h index 495eaa0e..2273dba2 100644 --- a/dynasm/dasm_mips.h +++ b/dynasm/dasm_mips.h @@ -141,6 +141,7 @@ void dasm_setup(Dst_DECL, const void *actionlist) if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); + D->sections[i].rbuf = D->sections[i].buf - D->sections[i].pos; D->sections[i].ofs = 0; } } diff --git a/dynasm/dasm_ppc.h b/dynasm/dasm_ppc.h index 30b757e3..14db019d 100644 --- a/dynasm/dasm_ppc.h +++ b/dynasm/dasm_ppc.h @@ -141,6 +141,7 @@ void dasm_setup(Dst_DECL, const void *actionlist) if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); + D->sections[i].rbuf = D->sections[i].buf - D->sections[i].pos; D->sections[i].ofs = 0; } } diff --git a/dynasm/dasm_x86.h b/dynasm/dasm_x86.h index 66a68ea5..ae5cb429 100644 --- a/dynasm/dasm_x86.h +++ b/dynasm/dasm_x86.h @@ -140,6 +140,7 @@ void dasm_setup(Dst_DECL, const void *actionlist) if (D->pclabels) memset((void *)D->pclabels, 0, D->pcsize); for (i = 0; i < D->maxsection; i++) { D->sections[i].pos = DASM_SEC2POS(i); + D->sections[i].rbuf = D->sections[i].buf - D->sections[i].pos; D->sections[i].ofs = 0; } }