aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2024-02-29 09:45:10 -0500
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>2024-02-29 09:52:18 -0500
commit789519210ac24ec1b5a4b5b677c0bf6f40b555c0 (patch)
tree92131720d3f2b5dc22330c5ce5d50db0ae4ef13e
parent9dc22f846d7f11a9b14dd87911afb2275911c100 (diff)
downloadlibrseq-789519210ac24ec1b5a4b5b677c0bf6f40b555c0.tar.gz
x86: Introduce RSEQ_ASM_U32
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
-rw-r--r--include/rseq/arch/x86.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/rseq/arch/x86.h b/include/rseq/arch/x86.h
index 8b54b37..1385dc4 100644
--- a/include/rseq/arch/x86.h
+++ b/include/rseq/arch/x86.h
@@ -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" \