markers: ensure assembly is portable by using .hword instead of .word
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 22 Feb 2011 17:31:48 +0000 (12:31 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 22 Feb 2011 17:31:48 +0000 (12:31 -0500)
http://www.chemie.fu-berlin.de/chemnet/use/info/gas/gas_7.html

.hword expressions

This expects zero or more expressions, and emits a 16 bit number for each.

This directive is a synonym for `.short'; depending on the target architecture,
it may also be a synonym for `.word'.

(caused marker struct layout discrepancy on ARM)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/marker.h
include/ust/processor.h

index c565268dcf70e409402df3356b5ec63fa82b15ac..c82dd30dfef04326376057ab8608579776814a1e 100644 (file)
@@ -113,8 +113,8 @@ struct marker {
                        _ASM_PTR "(__mstrtab_" __stringify(channel) "_" __stringify(name) "_format_" __stringify(unique) ")\n\t" /* format string */ \
                        ".byte 0\n\t" /* state imv */                                           \
                        ".byte 0\n\t" /* ptype */                                                       \
-                       ".word 0\n\t" /* channel_id */                                          \
-                       ".word 0\n\t" /* event_id */                                            \
+                       ".hword 0\n\t" /* channel_id */                                         \
+                       ".hword 0\n\t" /* event_id */                                           \
                        ".balign " __stringify(__WORDSIZE) " / 8\n\t" /* alignment */                   \
                        _ASM_PTR "(marker_probe_cb)\n\t" /* call */                             \
                        _ASM_PTR "(__mark_empty_function)\n\t" /* marker_probe_closure single.field1 */ \
index 098e6b3eaaa4f6ee40ed86190c4f2780e2636a52..8a01a8868c19385b6990957693dd2915ce203f15 100644 (file)
@@ -293,7 +293,7 @@ static inline int fls(int x)
             /* Start TLS access of private reg stack pointer */ \
             ".byte 0x66\n\t" \
             "leaq ust_reg_stack_ptr@tlsgd(%%rip), %%rdi\n\t" \
-            ".word 0x6666\n\t" \
+            ".hword 0x6666\n\t" \
             "rex64\n\t" \
             "call __tls_get_addr@plt\n\t" \
             /* --- End TLS access */ \
@@ -305,7 +305,7 @@ static inline int fls(int x)
             /* Start TLS access of private reg stack */ \
             ".byte 0x66\n\t" \
             "leaq ust_reg_stack@tlsgd(%%rip), %%rdi\n\t" \
-            ".word 0x6666\n\t" \
+            ".hword 0x6666\n\t" \
             "rex64\n\t" \
             "call __tls_get_addr@plt\n\t" \
             /* --- End TLS access */ \
This page took 0.024389 seconds and 4 git commands to generate.