rseq: do not set back rseq_cs to 0
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 2 Nov 2016 21:55:48 +0000 (15:55 -0600)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 22 Nov 2016 20:20:02 +0000 (15:20 -0500)
Now done lazily by the kernel.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/rseq-arm.h
libringbuffer/rseq-ppc.h
libringbuffer/rseq-x86.h

index 656b87ef9039cb080098f9f12daa527b8b8cd195..d4731c96f424cd10a1fffe16f878320b01f5c0c2 100644 (file)
 /*
  * The __rseq_table section can be used by debuggers to better handle
  * single-stepping through the restartable critical sections.
- *
- * Load the immediate value 0 into register r1 right after the ldr
- * instruction to improve instruction-level parallelism: load the
- * constant while the processor is stalled waiting for the load to
- * complete, which is required by the following comparison and branch.
  */
 
 #define RSEQ_FINISH_ASM(_target_final, _to_write_final, _start_value, \
@@ -53,7 +48,6 @@ do { \
                "str r0, [%[rseq_cs]]\n\t" \
                RSEQ_INJECT_ASM(2) \
                "ldr r0, %[current_event_counter]\n\t" \
-               "mov r1, #0\n\t" \
                "cmp %[start_event_counter], r0\n\t" \
                "bne 5f\n\t" \
                RSEQ_INJECT_ASM(3) \
@@ -61,15 +55,12 @@ do { \
                _final_store \
                "2:\n\t" \
                RSEQ_INJECT_ASM(5) \
-               "str r1, [%[rseq_cs]]\n\t" \
                _teardown \
                "b 4f\n\t" \
                ".balign 32\n\t" \
                "3:\n\t" \
                ".word 1b, 0x0, 2b, 0x0, 5f, 0x0, 0x0, 0x0\n\t" \
                "5:\n\t" \
-               "mov r1, #0\n\t" \
-               "str r1, [%[rseq_cs]]\n\t" \
                _teardown \
                "b %l[failure]\n\t" \
                "4:\n\t" \
@@ -80,7 +71,7 @@ do { \
                  _spec_input \
                  _final_input \
                  RSEQ_INJECT_INPUT \
-               : "r0", "r1", "memory", "cc" \
+               : "r0", "memory", "cc" \
                  _extra_clobber \
                  RSEQ_INJECT_CLOBBER \
                : _failure \
index ac3c1862e4596420e043c319edc144fb46394c1f..5737b1afc9b2ffd9ad9f2164d1b73bdbea7b52a8 100644 (file)
                _final_store \
                "2:\n\t" \
                RSEQ_INJECT_ASM(5) \
-               "li %%r17, 0\n\t" \
-               "std %%r17, 0(%[rseq_cs])\n\t" \
                _teardown \
                "b 5f\n\t" \
                "4:\n\t" \
-               "li %%r17, 0\n\t" \
-               "std %%r17, 0(%[rseq_cs])\n\t" \
                _teardown \
                "b %l[failure]\n\t" \
                "5:\n\t" \
                _final_store \
                "2:\n\t" \
                RSEQ_INJECT_ASM(5) \
-               "li %%r17, 0\n\t" \
-               "stw %%r17, 0(%[rseq_cs])\n\t" \
                _teardown \
                "b 5f\n\t" \
                "4:\n\t" \
-               "li %%r17, 0\n\t" \
-               "std %%r17, 0(%[rseq_cs])\n\t" \
                _teardown \
                "b %l[failure]\n\t" \
                "5:\n\t" \
index 556f4544b31c2d61cedcc17d90239193442e1090..0831b9c10f080a170bc2bb269ed3c3566b0deede 100644 (file)
@@ -56,11 +56,9 @@ do { \
                _final_store \
                "2:\n\t" \
                RSEQ_INJECT_ASM(5) \
-               "movq $0, %[rseq_cs]\n\t" \
                _teardown \
                ".pushsection __rseq_failure, \"a\"\n\t" \
                "4:\n\t" \
-               "movq $0, %[rseq_cs]\n\t" \
                _teardown \
                "jmp %l[failure]\n\t" \
                ".popsection\n\t" \
@@ -174,11 +172,9 @@ do { \
                _final_store \
                "2:\n\t" \
                RSEQ_INJECT_ASM(5) \
-               "movl $0, %[rseq_cs]\n\t" \
                _teardown \
                ".pushsection __rseq_failure, \"a\"\n\t" \
                "4:\n\t" \
-               "movl $0, %[rseq_cs]\n\t" \
                _teardown \
                "jmp %l[failure]\n\t" \
                ".popsection\n\t" \
This page took 0.027226 seconds and 5 git commands to generate.