Debian Codegraph @

tapset/dyninst/endian.stp

raw
1 // NB: functionally equivalent to linux/endian.stp
2
3 %{
4 #include <endian.h>
5 %}
6
7 function big_endian2:long (val:long) %{ /* pure */
8 STAP_RETVALUE = htobe16((uint16_t)STAP_ARG_val);
9 %}
10
11 function big_endian4:long (val:long) %{ /* pure */
12 STAP_RETVALUE = htobe32((uint32_t)STAP_ARG_val);
13 %}
14
15 function big_endian8:long (val:long) %{ /* pure */
16 STAP_RETVALUE = htobe64((uint64_t)STAP_ARG_val);
17 %}
18
19 function little_endian2:long (val:long) %{ /* pure */
20 STAP_RETVALUE = htole16((uint16_t)STAP_ARG_val);
21 %}
22
23 function little_endian4:long (val:long) %{ /* pure */
24 STAP_RETVALUE = htole32((uint32_t)STAP_ARG_val);
25 %}
26
27 function little_endian8:long (val:long) %{ /* pure */
28 STAP_RETVALUE = htole64((uint64_t)STAP_ARG_val);
29 %}