diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2024-02-29 09:44:47 -0500 |
---|---|---|
committer | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2024-02-29 09:44:47 -0500 |
commit | d68304d1ecb7fa6d020cf7bdbf0b089d73facad7 (patch) | |
tree | e2636a830d14036443f3dffd6571598dd7ce4157 | |
parent | 1f37e931aa2cd53026a45792382613d8b1ad8715 (diff) | |
download | librseq-d68304d1ecb7fa6d020cf7bdbf0b089d73facad7.tar.gz |
ppc: 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: Ic476d6dfca6f714cf892f84560884157abbc0360
-rw-r--r-- | include/rseq/arch/ppc.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/rseq/arch/ppc.h b/include/rseq/arch/ppc.h index 638d2ba..8c7566e 100644 --- a/include/rseq/arch/ppc.h +++ b/include/rseq/arch/ppc.h @@ -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" \ |