arm: Move RSEQ_ASM_DEFINE_ABORT table_label parameter to 4th argument
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Feb 2024 21:39:02 +0000 (16:39 -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: I855d645ec5e315ef19836adebfd2f9350a3763c5

include/rseq/rseq-arm-bits.h
include/rseq/rseq-arm.h

index e2e514a0ec11d3e07de9d2c69b0568e7a7602e93..8c3ce402f8d92966891ab0792c48f7e35a3ff01c 100644 (file)
@@ -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"
index bfd21e9f214e04d819c6a572be1ae6ad9667dddb..4baaacd0b77fdc2b059ef3d0361d5859f06125a9 100644 (file)
@@ -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)
 
 /*
This page took 0.027459 seconds and 4 git commands to generate.