mips: Move RSEQ_ASM_DEFINE_ABORT table_label parameter to 4th argument
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Feb 2024 21:41:47 +0000 (16:41 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Feb 2024 22:28:07 +0000 (17:28 -0500)
Makes the first 3 arguments same as other architectures.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Icf41ded4ce5860cf8c12a23dff1fe434210844b0

include/rseq/rseq-mips-bits.h
include/rseq/rseq-mips.h

index 35daf1e112d72631b99c9a0bfc105111d50cc62f..f1a5f93f0410d38fb468f1c9cf9144584ddbcd9a 100644 (file)
@@ -46,7 +46,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),
@@ -110,7 +110,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),
@@ -167,7 +167,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),
@@ -230,7 +230,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),
@@ -310,7 +310,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),
@@ -399,12 +399,12 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_memcpy_store__ptr)(intptr_t *v, intp
                RSEQ_ASM_LONG_L " %[dst], %[rseq_scratch1]\n\t"
                RSEQ_ASM_LONG_L " %[src], %[rseq_scratch0]\n\t"
                "b 8f\n\t"
-               RSEQ_ASM_DEFINE_ABORT(3, 4,
+               RSEQ_ASM_DEFINE_ABORT(4,
                                      /* teardown */
                                      RSEQ_ASM_LONG_L " %[len], %[rseq_scratch2]\n\t"
                                      RSEQ_ASM_LONG_L " %[dst], %[rseq_scratch1]\n\t"
                                      RSEQ_ASM_LONG_L " %[src], %[rseq_scratch0]\n\t",
-                                     abort, 1b, 2b, 4f)
+                                     abort, 3, 1b, 2b, 4f)
                RSEQ_ASM_DEFINE_TEARDOWN(5,
                                        /* teardown */
                                        RSEQ_ASM_LONG_L " %[len], %[rseq_scratch2]\n\t"
index 0c556895ea8315f6ae6382e5ad932efd879b20c3..22729bfbdb2b2571074e83cbcf534063b4572327 100644 (file)
@@ -160,8 +160,8 @@ do {                                                                        \
                ".popsection\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" \
@@ -177,24 +177,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)
 
 /*
This page took 0.02649 seconds and 4 git commands to generate.