From: Mathieu Desnoyers Date: Tue, 22 Feb 2011 17:31:48 +0000 (-0500) Subject: markers: ensure assembly is portable by using .hword instead of .word X-Git-Tag: v0.12~38 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=34174843695ce2380fed2bddb1c631be97420f8d;p=ust.git markers: ensure assembly is portable by using .hword instead of .word 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 --- diff --git a/include/ust/marker.h b/include/ust/marker.h index c565268..c82dd30 100644 --- a/include/ust/marker.h +++ b/include/ust/marker.h @@ -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 */ \ diff --git a/include/ust/processor.h b/include/ust/processor.h index 098e6b3..8a01a88 100644 --- a/include/ust/processor.h +++ b/include/ust/processor.h @@ -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 */ \