From bbf6c31a7b1df703cdb0e823e55f0c5ecea7f22b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 27 Feb 2024 17:04:01 -0500 Subject: [PATCH] riscv: Add missing "inc" parameter to RSEQ_ASM_OP_R_DEREF_ADDV Signed-off-by: Mathieu Desnoyers Change-Id: Iff9fb8f46acef741a22065a6c0b976794c4606dd --- include/rseq/rseq-riscv-bits.h | 2 +- include/rseq/rseq-riscv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rseq/rseq-riscv-bits.h b/include/rseq/rseq-riscv-bits.h index 3cc8ece..2ed6b5d 100644 --- a/include/rseq/rseq-riscv-bits.h +++ b/include/rseq/rseq-riscv-bits.h @@ -246,7 +246,7 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_add_load_add_store__ptr)(intptr_t *ptr, o #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, "%l[error1]") #endif - RSEQ_ASM_OP_R_DEREF_ADDV(ptr, off, 3) + RSEQ_ASM_OP_R_DEREF_ADDV(ptr, off, inc, 3) RSEQ_INJECT_ASM(4) RSEQ_ASM_DEFINE_ABORT(4, "", abort) : /* gcc asm goto does not allow outputs */ diff --git a/include/rseq/rseq-riscv.h b/include/rseq/rseq-riscv.h index 64bfe34..95ade6e 100644 --- a/include/rseq/rseq-riscv.h +++ b/include/rseq/rseq-riscv.h @@ -161,7 +161,7 @@ do { \ "bnez " RSEQ_ASM_TMP_REG_1 ", 222b\n" \ "333:\n" -#define RSEQ_ASM_OP_R_DEREF_ADDV(ptr, off, post_commit_label) \ +#define RSEQ_ASM_OP_R_DEREF_ADDV(ptr, off, inc, post_commit_label) \ "mv " RSEQ_ASM_TMP_REG_1 ", %[" __rseq_str(ptr) "]\n" \ RSEQ_ASM_OP_R_ADD(off) \ RSEQ_ASM_REG_L RSEQ_ASM_TMP_REG_1 ", 0(" RSEQ_ASM_TMP_REG_1 ")\n" \ -- 2.34.1