aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2024-02-27 16:39:02 -0500
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>2024-02-27 17:28:07 -0500
commit1bb8c5e3e51c459fbc1306afbe69919334769b51 (patch)
tree9270f6bd099122723f6385a2627c2e9acbedd406
parent83957371ff939d007d7ebf9cfc985724d3b80906 (diff)
downloadlibrseq-1bb8c5e3e51c459fbc1306afbe69919334769b51.tar.gz
arm: Move RSEQ_ASM_DEFINE_ABORT table_label parameter to 4th argument
Makes the first 3 arguments same as other architectures. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Change-Id: I855d645ec5e315ef19836adebfd2f9350a3763c5
-rw-r--r--include/rseq/rseq-arm-bits.h14
-rw-r--r--include/rseq/rseq-arm.h20
2 files changed, 17 insertions, 17 deletions
diff --git a/include/rseq/rseq-arm-bits.h b/include/rseq/rseq-arm-bits.h
index e2e514a..8c3ce40 100644
--- a/include/rseq/rseq-arm-bits.h
+++ b/include/rseq/rseq-arm-bits.h
@@ -47,7 +47,7 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_store__ptr)(intptr_t *v, intptr_t ex
"2:\n\t"
RSEQ_INJECT_ASM(5)
"b 5f\n\t"
- RSEQ_ASM_DEFINE_ABORT(3, 4, "", abort, 1b, 2b, 4f)
+ RSEQ_ASM_DEFINE_ABORT(4, "", abort, 3, 1b, 2b, 4f)
"5:\n\t"
: /* gcc asm goto does not allow outputs */
: [cpu_id] "r" (cpu),
@@ -118,7 +118,7 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbeq_store_add_load_store__ptr)(intptr_t
"2:\n\t"
RSEQ_INJECT_ASM(5)
"b 5f\n\t"
- RSEQ_ASM_DEFINE_ABORT(3, 4, "", abort, 1b, 2b, 4f)
+ RSEQ_ASM_DEFINE_ABORT(4, "", abort, 3, 1b, 2b, 4f)
"5:\n\t"
: /* gcc asm goto does not allow outputs */
: [cpu_id] "r" (cpu),
@@ -180,7 +180,7 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_add_store__ptr)(intptr_t *v, intptr_t cou
"2:\n\t"
RSEQ_INJECT_ASM(4)
"b 5f\n\t"
- RSEQ_ASM_DEFINE_ABORT(3, 4, "", abort, 1b, 2b, 4f)
+ RSEQ_ASM_DEFINE_ABORT(4, "", abort, 3, 1b, 2b, 4f)
"5:\n\t"
: /* gcc asm goto does not allow outputs */
: [cpu_id] "r" (cpu),
@@ -250,7 +250,7 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_load_cbne_store__ptr)(intptr_t *v, i
"2:\n\t"
RSEQ_INJECT_ASM(6)
"b 5f\n\t"
- RSEQ_ASM_DEFINE_ABORT(3, 4, "", abort, 1b, 2b, 4f)
+ RSEQ_ASM_DEFINE_ABORT(4, "", abort, 3, 1b, 2b, 4f)
"5:\n\t"
: /* gcc asm goto does not allow outputs */
: [cpu_id] "r" (cpu),
@@ -338,7 +338,7 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_store_store__ptr)(intptr_t *v, intpt
"2:\n\t"
RSEQ_INJECT_ASM(6)
"b 5f\n\t"
- RSEQ_ASM_DEFINE_ABORT(3, 4, "", abort, 1b, 2b, 4f)
+ RSEQ_ASM_DEFINE_ABORT(4, "", abort, 3, 1b, 2b, 4f)
"5:\n\t"
: /* gcc asm goto does not allow outputs */
: [cpu_id] "r" (cpu),
@@ -436,12 +436,12 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_memcpy_store__ptr)(intptr_t *v, intp
"ldr %[dst], %[rseq_scratch1]\n\t"
"ldr %[src], %[rseq_scratch0]\n\t"
"b 8f\n\t"
- RSEQ_ASM_DEFINE_ABORT(3, 4,
+ RSEQ_ASM_DEFINE_ABORT(4,
/* teardown */
"ldr %[len], %[rseq_scratch2]\n\t"
"ldr %[dst], %[rseq_scratch1]\n\t"
"ldr %[src], %[rseq_scratch0]\n\t",
- abort, 1b, 2b, 4f)
+ abort, 3, 1b, 2b, 4f)
RSEQ_ASM_DEFINE_TEARDOWN(5,
/* teardown */
"ldr %[len], %[rseq_scratch2]\n\t"
diff --git a/include/rseq/rseq-arm.h b/include/rseq/rseq-arm.h
index bfd21e9..4baaacd 100644
--- a/include/rseq/rseq-arm.h
+++ b/include/rseq/rseq-arm.h
@@ -171,8 +171,8 @@ do { \
__rseq_str(label) ":\n\t"
/* Only used in RSEQ_ASM_DEFINE_ABORT. */
-#define __RSEQ_ASM_DEFINE_ABORT(table_label, label, teardown, \
- abort_label, version, flags, \
+#define __RSEQ_ASM_DEFINE_ABORT(label, teardown, abort_label, \
+ table_label, version, flags, \
start_ip, post_commit_offset, abort_ip) \
".balign 32\n\t" \
__rseq_str(table_label) ":\n\t" \
@@ -186,24 +186,24 @@ do { \
/*
* Define a critical section abort handler.
*
- * @table_label:
- * Local label to the critical section descriptor copy placed near
- * the program counter. This is done for performance reasons because
- * computing this address is faster than accessing the program data.
* @label:
* Local label to the abort handler.
* @teardown:
* Sequence of instructions to run on abort.
* @abort_label:
* C label to jump to at the end of the sequence.
+ * @table_label:
+ * Local label to the critical section descriptor copy placed near
+ * the program counter. This is done for performance reasons because
+ * computing this address is faster than accessing the program data.
*
* The purpose of @start_ip, @post_commit_ip, and @abort_ip are
* documented in RSEQ_ASM_DEFINE_TABLE.
*/
-#define RSEQ_ASM_DEFINE_ABORT(table_label, label, teardown, abort_label, \
- start_ip, post_commit_ip, abort_ip) \
- __RSEQ_ASM_DEFINE_ABORT(table_label, label, teardown, \
- abort_label, 0x0, 0x0, start_ip, \
+#define RSEQ_ASM_DEFINE_ABORT(label, teardown, abort_label, \
+ table_label, start_ip, post_commit_ip, abort_ip) \
+ __RSEQ_ASM_DEFINE_ABORT(label, teardown, abort_label, \
+ table_label, 0x0, 0x0, start_ip, \
(post_commit_ip - start_ip), abort_ip)
/*