Use rseq for cpu_id in libringbuffer
[deliverable/lttng-ust.git] / libringbuffer / rseq-x86.h
index 29e5647d6963c5ed412772ed729b834f7a56a295..556f4544b31c2d61cedcc17d90239193442e1090 100644 (file)
@@ -46,7 +46,8 @@ do { \
                "1:\n\t" \
                _setup \
                RSEQ_INJECT_ASM(1) \
-               "movq $3b, %[rseq_cs]\n\t" \
+               "leaq 3b(%%rip), %%rax\n\t" \
+               "movq %%rax, %[rseq_cs]\n\t" \
                RSEQ_INJECT_ASM(2) \
                "cmpl %[start_event_counter], %[current_event_counter]\n\t" \
                "jnz 4f\n\t" \
@@ -63,14 +64,14 @@ do { \
                _teardown \
                "jmp %l[failure]\n\t" \
                ".popsection\n\t" \
-               : /* no outputs */ \
+               : /* gcc asm goto does not allow outputs */ \
                : [start_event_counter]"r"((_start_value).event_counter), \
                  [current_event_counter]"m"((_start_value).rseqp->u.e.event_counter), \
                  [rseq_cs]"m"((_start_value).rseqp->rseq_cs) \
                  _spec_input \
                  _final_input \
                  RSEQ_INJECT_INPUT \
-               : "memory", "cc" \
+               : "memory", "cc", "rax" \
                  _extra_clobber \
                  RSEQ_INJECT_CLOBBER \
                : _failure \
@@ -181,7 +182,7 @@ do { \
                _teardown \
                "jmp %l[failure]\n\t" \
                ".popsection\n\t" \
-               : /* no outputs */ \
+               : /* gcc asm goto does not allow outputs */ \
                : [start_event_counter]"m"((_start_value).event_counter), \
                  [current_event_counter]"m"((_start_value).rseqp->u.e.event_counter), \
                  [rseq_cs]"m"((_start_value).rseqp->rseq_cs) \
This page took 0.023973 seconds and 5 git commands to generate.