Debian Codegraph @

testsuite/systemtap.printf/bin3.stp

raw
1 # test of 16-bit binary prints
2 # need to use big_endian2() to get consistent results across
3 # different-endian architectures.
4
5 probe begin
6 {
7 printf("%2b", big_endian2(0x12))
8 printf("%2b", big_endian2(0x34))
9 printf("%2b%2b", big_endian2(0xabcd), big_endian2(0x5678))
10 a = big_endian2(0x12345678)
11 b = big_endian2(0xabcd)
12 c = big_endian2(0x8888)
13 d = big_endian2(0xcdef)
14 printf("%2b%2b%2b%2b", a, b, c, d)
15 printf("a=%2b b=%2b c=%2b d=%2b",a,b,c,d)
16 exit()
17 }