diff options
author | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2024-02-27 17:07:49 -0500 |
---|---|---|
committer | Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | 2024-02-27 17:28:07 -0500 |
commit | 1bf71e6db222ae29511ff7369b245b8e62cdfc53 (patch) | |
tree | 47f1fcb82058695122c138e78f6fb51a5d81a713 | |
parent | c4f3965fe423de70823e4aec8c0287f3eb8f7c77 (diff) | |
download | librseq-1bf71e6db222ae29511ff7369b245b8e62cdfc53.tar.gz |
s390: namespace public header macros under RSEQ_ASM_
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I777a7b3feb9361c9dbc5327f643fc2d09aaa238e
-rw-r--r-- | include/rseq/rseq-s390-bits.h | 96 | ||||
-rw-r--r-- | include/rseq/rseq-s390.h | 30 |
2 files changed, 63 insertions, 63 deletions
diff --git a/include/rseq/rseq-s390-bits.h b/include/rseq/rseq-s390-bits.h index 3e82ec6..47cf563 100644 --- a/include/rseq/rseq-s390-bits.h +++ b/include/rseq/rseq-s390-bits.h @@ -28,16 +28,16 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_store__ptr)(intptr_t *v, intptr_t ex RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, 4f) RSEQ_INJECT_ASM(3) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz %l[ne]\n\t" RSEQ_INJECT_ASM(4) #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, %l[error1]) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz %l[error2]\n\t" #endif /* final store */ - LONG_S " %[newv], %[v]\n\t" + RSEQ_ASM_LONG_S " %[newv], %[v]\n\t" "2:\n\t" RSEQ_INJECT_ASM(5) RSEQ_ASM_DEFINE_ABORT(4, "", abort) @@ -92,21 +92,21 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbeq_store_add_load_store__ptr)(intptr_t RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, 4f) RSEQ_INJECT_ASM(3) - LONG_L " %%r1, %[v]\n\t" - LONG_CMP_R " %%r1, %[expectnot]\n\t" + RSEQ_ASM_LONG_L " %%r1, %[v]\n\t" + RSEQ_ASM_LONG_CMP_R " %%r1, %[expectnot]\n\t" "je %l[eq]\n\t" RSEQ_INJECT_ASM(4) #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, %l[error1]) - LONG_L " %%r1, %[v]\n\t" - LONG_CMP_R " %%r1, %[expectnot]\n\t" + RSEQ_ASM_LONG_L " %%r1, %[v]\n\t" + RSEQ_ASM_LONG_CMP_R " %%r1, %[expectnot]\n\t" "je %l[error2]\n\t" #endif - LONG_S " %%r1, %[load]\n\t" - LONG_ADD_R " %%r1, %[voffp]\n\t" - LONG_L " %%r1, 0(%%r1)\n\t" + RSEQ_ASM_LONG_S " %%r1, %[load]\n\t" + RSEQ_ASM_LONG_ADD_R " %%r1, %[voffp]\n\t" + RSEQ_ASM_LONG_L " %%r1, 0(%%r1)\n\t" /* final store */ - LONG_S " %%r1, %[v]\n\t" + RSEQ_ASM_LONG_S " %%r1, %[v]\n\t" "2:\n\t" RSEQ_INJECT_ASM(5) RSEQ_ASM_DEFINE_ABORT(4, "", abort) @@ -163,10 +163,10 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_add_store__ptr)(intptr_t *v, intptr_t cou #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, %l[error1]) #endif - LONG_L " %%r0, %[v]\n\t" - LONG_ADD_R " %%r0, %[count]\n\t" + RSEQ_ASM_LONG_L " %%r0, %[v]\n\t" + RSEQ_ASM_LONG_ADD_R " %%r0, %[count]\n\t" /* final store */ - LONG_S " %%r0, %[v]\n\t" + RSEQ_ASM_LONG_S " %%r0, %[v]\n\t" "2:\n\t" RSEQ_INJECT_ASM(4) RSEQ_ASM_DEFINE_ABORT(4, "", abort) @@ -217,21 +217,21 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_load_cbne_store__ptr)(intptr_t *v, i RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, 4f) RSEQ_INJECT_ASM(3) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz %l[ne]\n\t" RSEQ_INJECT_ASM(4) - LONG_CMP " %[expect2], %[v2]\n\t" + RSEQ_ASM_LONG_CMP " %[expect2], %[v2]\n\t" "jnz %l[ne]\n\t" RSEQ_INJECT_ASM(5) #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, %l[error1]) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz %l[error2]\n\t" - LONG_CMP " %[expect2], %[v2]\n\t" + RSEQ_ASM_LONG_CMP " %[expect2], %[v2]\n\t" "jnz %l[error3]\n\t" #endif /* final store */ - LONG_S " %[newv], %[v]\n\t" + RSEQ_ASM_LONG_S " %[newv], %[v]\n\t" "2:\n\t" RSEQ_INJECT_ASM(6) RSEQ_ASM_DEFINE_ABORT(4, "", abort) @@ -301,19 +301,19 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_store_store__ptr)(intptr_t *v, intpt RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, 4f) RSEQ_INJECT_ASM(3) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz %l[ne]\n\t" RSEQ_INJECT_ASM(4) #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, %l[error1]) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz %l[error2]\n\t" #endif /* try store */ - LONG_S " %[newv2], %[v2]\n\t" + RSEQ_ASM_LONG_S " %[newv2], %[v2]\n\t" RSEQ_INJECT_ASM(5) /* final store */ - LONG_S " %[newv], %[v]\n\t" + RSEQ_ASM_LONG_S " %[newv], %[v]\n\t" "2:\n\t" RSEQ_INJECT_ASM(6) RSEQ_ASM_DEFINE_ABORT(4, "", abort) @@ -372,61 +372,61 @@ int RSEQ_TEMPLATE_IDENTIFIER(rseq_load_cbne_memcpy_store__ptr)(intptr_t *v, intp RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error1]) RSEQ_ASM_DEFINE_EXIT_POINT(1f, %l[error2]) #endif - LONG_S " %[src], %[rseq_scratch0]\n\t" - LONG_S " %[dst], %[rseq_scratch1]\n\t" - LONG_S " %[len], %[rseq_scratch2]\n\t" + RSEQ_ASM_LONG_S " %[src], %[rseq_scratch0]\n\t" + RSEQ_ASM_LONG_S " %[dst], %[rseq_scratch1]\n\t" + RSEQ_ASM_LONG_S " %[len], %[rseq_scratch2]\n\t" /* Start rseq by storing table entry pointer into rseq_cs. */ RSEQ_ASM_STORE_RSEQ_CS(1, 3b, rseq_cs) RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, 4f) RSEQ_INJECT_ASM(3) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz 5f\n\t" RSEQ_INJECT_ASM(4) #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, 6f) - LONG_CMP " %[expect], %[v]\n\t" + RSEQ_ASM_LONG_CMP " %[expect], %[v]\n\t" "jnz 7f\n\t" #endif /* try memcpy */ - LONG_LT_R " %[len], %[len]\n\t" + RSEQ_ASM_LONG_LT_R " %[len], %[len]\n\t" "jz 333f\n\t" "222:\n\t" "ic %%r0,0(%[src])\n\t" "stc %%r0,0(%[dst])\n\t" - LONG_ADDI " %[src], 1\n\t" - LONG_ADDI " %[dst], 1\n\t" - LONG_ADDI " %[len], -1\n\t" + RSEQ_ASM_LONG_ADDI " %[src], 1\n\t" + RSEQ_ASM_LONG_ADDI " %[dst], 1\n\t" + RSEQ_ASM_LONG_ADDI " %[len], -1\n\t" "jnz 222b\n\t" "333:\n\t" RSEQ_INJECT_ASM(5) /* final store */ - LONG_S " %[newv], %[v]\n\t" + RSEQ_ASM_LONG_S " %[newv], %[v]\n\t" "2:\n\t" RSEQ_INJECT_ASM(6) /* teardown */ - LONG_L " %[len], %[rseq_scratch2]\n\t" - LONG_L " %[dst], %[rseq_scratch1]\n\t" - LONG_L " %[src], %[rseq_scratch0]\n\t" + RSEQ_ASM_LONG_L " %[len], %[rseq_scratch2]\n\t" + RSEQ_ASM_LONG_L " %[dst], %[rseq_scratch1]\n\t" + RSEQ_ASM_LONG_L " %[src], %[rseq_scratch0]\n\t" RSEQ_ASM_DEFINE_ABORT(4, - LONG_L " %[len], %[rseq_scratch2]\n\t" - LONG_L " %[dst], %[rseq_scratch1]\n\t" - LONG_L " %[src], %[rseq_scratch0]\n\t", + RSEQ_ASM_LONG_L " %[len], %[rseq_scratch2]\n\t" + RSEQ_ASM_LONG_L " %[dst], %[rseq_scratch1]\n\t" + RSEQ_ASM_LONG_L " %[src], %[rseq_scratch0]\n\t", abort) RSEQ_ASM_DEFINE_TEARDOWN(5, - LONG_L " %[len], %[rseq_scratch2]\n\t" - LONG_L " %[dst], %[rseq_scratch1]\n\t" - LONG_L " %[src], %[rseq_scratch0]\n\t", + RSEQ_ASM_LONG_L " %[len], %[rseq_scratch2]\n\t" + RSEQ_ASM_LONG_L " %[dst], %[rseq_scratch1]\n\t" + RSEQ_ASM_LONG_L " %[src], %[rseq_scratch0]\n\t", ne) #ifdef RSEQ_COMPARE_TWICE RSEQ_ASM_DEFINE_TEARDOWN(6, - LONG_L " %[len], %[rseq_scratch2]\n\t" - LONG_L " %[dst], %[rseq_scratch1]\n\t" - LONG_L " %[src], %[rseq_scratch0]\n\t", + RSEQ_ASM_LONG_L " %[len], %[rseq_scratch2]\n\t" + RSEQ_ASM_LONG_L " %[dst], %[rseq_scratch1]\n\t" + RSEQ_ASM_LONG_L " %[src], %[rseq_scratch0]\n\t", error1) RSEQ_ASM_DEFINE_TEARDOWN(7, - LONG_L " %[len], %[rseq_scratch2]\n\t" - LONG_L " %[dst], %[rseq_scratch1]\n\t" - LONG_L " %[src], %[rseq_scratch0]\n\t", + RSEQ_ASM_LONG_L " %[len], %[rseq_scratch2]\n\t" + RSEQ_ASM_LONG_L " %[dst], %[rseq_scratch1]\n\t" + RSEQ_ASM_LONG_L " %[src], %[rseq_scratch0]\n\t", error2) #endif : /* gcc asm goto does not allow outputs */ diff --git a/include/rseq/rseq-s390.h b/include/rseq/rseq-s390.h index fc898e6..c046fac 100644 --- a/include/rseq/rseq-s390.h +++ b/include/rseq/rseq-s390.h @@ -31,13 +31,13 @@ do { \ #ifdef __s390x__ -#define LONG_L "lg" -#define LONG_S "stg" -#define LONG_LT_R "ltgr" -#define LONG_CMP "cg" -#define LONG_CMP_R "cgr" -#define LONG_ADDI "aghi" -#define LONG_ADD_R "agr" +#define RSEQ_ASM_LONG_L "lg" +#define RSEQ_ASM_LONG_S "stg" +#define RSEQ_ASM_LONG_LT_R "ltgr" +#define RSEQ_ASM_LONG_CMP "cg" +#define RSEQ_ASM_LONG_CMP_R "cgr" +#define RSEQ_ASM_LONG_ADDI "aghi" +#define RSEQ_ASM_LONG_ADD_R "agr" #define __RSEQ_ASM_DEFINE_TABLE(label, version, flags, \ start_ip, post_commit_offset, abort_ip) \ @@ -91,13 +91,13 @@ do { \ ".long 0x0, " __rseq_str(start_ip) ", 0x0, " __rseq_str(exit_ip) "\n\t" \ ".popsection\n\t" -#define LONG_L "l" -#define LONG_S "st" -#define LONG_LT_R "ltr" -#define LONG_CMP "c" -#define LONG_CMP_R "cr" -#define LONG_ADDI "ahi" -#define LONG_ADD_R "ar" +#define RSEQ_ASM_LONG_L "l" +#define RSEQ_ASM_LONG_S "st" +#define RSEQ_ASM_LONG_LT_R "ltr" +#define RSEQ_ASM_LONG_CMP "c" +#define RSEQ_ASM_LONG_CMP_R "cr" +#define RSEQ_ASM_LONG_ADDI "ahi" +#define RSEQ_ASM_LONG_ADD_R "ar" #endif @@ -108,7 +108,7 @@ do { \ #define RSEQ_ASM_STORE_RSEQ_CS(label, cs_label, rseq_cs) \ RSEQ_INJECT_ASM(1) \ "larl %%r0, " __rseq_str(cs_label) "\n\t" \ - LONG_S " %%r0, %[" __rseq_str(rseq_cs) "]\n\t" \ + RSEQ_ASM_LONG_S " %%r0, %[" __rseq_str(rseq_cs) "]\n\t" \ __rseq_str(label) ":\n\t" #define RSEQ_ASM_CBNE_CPU_ID(cpu_id, current_cpu_id, label) \ |