x86: Introduce RSEQ_ASM_U32
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Feb 2024 14:45:10 +0000 (09:45 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 29 Feb 2024 14:52:18 +0000 (09:52 -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: I966b67f00bf39bd0b26f8efd6c4f40cba4caa1cf

include/rseq/arch/x86.h

index 8b54b375882bcb83ff2312e2eacea5ffa14ba5eb..1385dc4f18e6c2e1d69c70928d095ed95695efb3 100644 (file)
@@ -88,6 +88,8 @@ do {                                                                  \
 # define RSEQ_ASM_U64_PTR(x)           ".long " x ", 0x0"
 #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
@@ -121,7 +123,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"           \
This page took 0.025125 seconds and 4 git commands to generate.