summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.printf/bin4.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.printf/bin4.stp')
-rw-r--r--testsuite/systemtap.printf/bin4.stp17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/systemtap.printf/bin4.stp b/testsuite/systemtap.printf/bin4.stp
new file mode 100644
index 00000000..638a38e6
--- /dev/null
+++ b/testsuite/systemtap.printf/bin4.stp
@@ -0,0 +1,17 @@
+# test of 32-bit binary prints
+# Also tests big_endian4()
+
+probe begin
+{
+ set_endian(2)
+ printf("%4b", 0x12)
+ printf("%4b", 0x34)
+ printf("%4b%4b", 0xabcdef00, 0x5678)
+ a = 0x12345678
+ b = 0x11112222
+ c = 0x88889999
+ d = 0xcdef0000
+ printf("%4b%4b%4b%4b", a, b, c, d)
+ printf("a=%4b b=%4b c=%4b d=%4b",a,b,c,d)
+ exit()
+}