ppc: Introduce RSEQ_ASM_U32
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Feb 2024 14:44:47 +0000 (09:44 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Feb 2024 14:44:47 +0000 (09:44 -0500)
This will allow moving __RSEQ_ASM_DEFINE_TABLE and
RSEQ_ASM_DEFINE_EXIT_POINT to a generic common header file.

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

include/rseq/arch/ppc.h

index 638d2ba185877a00d9eac66c3849e91e54391fd3..8c7566ed694a3c1768ed98d5e84cf833da3b7d4f 100644 (file)
@@ -90,6 +90,8 @@ do {                                                                  \
 # define RSEQ_ASM_U64_PTR(x)           ".long 0x0, " x
 #endif
 
+#define RSEQ_ASM_U32(x)                        ".long " x
+
 /*
  * Store the address of the critical section descriptor structure at
  * @cs_label into the @rseq_cs pointer and emit the label @label, which
@@ -129,7 +131,8 @@ do {                                                                        \
                ".pushsection __rseq_cs, \"aw\"\n\t"                            \
                ".balign 32\n\t"                                                \
                __rseq_str(label) ":\n\t"                                       \
-               ".long " __rseq_str(version) ", " __rseq_str(flags) "\n\t"      \
+               RSEQ_ASM_U32(__rseq_str(version)) "\n\t"                        \
+               RSEQ_ASM_U32(__rseq_str(flags)) "\n\t"                          \
                RSEQ_ASM_U64_PTR(__rseq_str(start_ip)) "\n\t"                   \
                RSEQ_ASM_U64_PTR(__rseq_str(post_commit_offset)) "\n\t"         \
                RSEQ_ASM_U64_PTR(__rseq_str(abort_ip)) "\n\t"                   \
@@ -193,7 +196,7 @@ do {                                                                        \
  */
 #define RSEQ_ASM_DEFINE_ABORT(label, teardown, abort_label)                    \
                ".pushsection __rseq_failure, \"ax\"\n\t"                       \
-               ".long " __rseq_str(RSEQ_SIG) "\n\t"                            \
+               RSEQ_ASM_U32(__rseq_str(RSEQ_SIG)) "\n\t"                       \
                __rseq_str(label) ":\n\t"                                       \
                teardown                                                        \
                "b %l[" __rseq_str(abort_label) "]\n\t"                         \
This page took 0.037291 seconds and 4 git commands to generate.