diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2024-02-29 09:44:28 -0500 |
---|---|---|
committer | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2024-02-29 09:44:28 -0500 |
commit | 500b4c059124ad291e337ff95a5927f3421e6489 (patch) | |
tree | e2d0681ff7fbcd1c11c7207a6243a50c4d7a1059 | |
parent | 0f9867868a9d337460c6f2e12bc54c47fe0e0333 (diff) | |
download | librseq-500b4c059124ad291e337ff95a5927f3421e6489.tar.gz |
arm: 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: I32a0eff75998afb1f8257c3312187ab2938d59a3
-rw-r--r-- | include/rseq/arch/arm.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/rseq/arch/arm.h b/include/rseq/arch/arm.h index 1a6ad12..6030d4f 100644 --- a/include/rseq/arch/arm.h +++ b/include/rseq/arch/arm.h @@ -105,13 +105,16 @@ do { \ # define RSEQ_ASM_U64_PTR(x) ".word " x ", 0x0" #endif +#define RSEQ_ASM_U32(x) ".word " x + /* Only used in RSEQ_ASM_DEFINE_TABLE. */ #define __RSEQ_ASM_DEFINE_TABLE(label, version, flags, start_ip, \ post_commit_offset, abort_ip) \ ".pushsection __rseq_cs, \"aw\"\n\t" \ ".balign 32\n\t" \ __rseq_str(label) ":\n\t" \ - ".word " __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" \ @@ -189,11 +192,12 @@ do { \ start_ip, post_commit_offset, abort_ip) \ ".balign 32\n\t" \ __rseq_str(table_label) ":\n\t" \ - ".word " __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" \ - ".word " __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" |