aboutsummaryrefslogtreecommitdiff
path: root/test/bitfield-load-unsigned.qbe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-16 12:26:18 -0700
committerMichael Forney <mforney@mforney.org>2019-04-16 12:26:18 -0700
commitde004660726acb148bf0022706b7019ca560172d (patch)
treede95581449d1db324c074859615501cf8f0bc5c3 /test/bitfield-load-unsigned.qbe
parent953e1e6f287d8bc00b2ef8d2197a20a549274eb3 (diff)
tests -> test
Diffstat (limited to 'test/bitfield-load-unsigned.qbe')
-rw-r--r--test/bitfield-load-unsigned.qbe14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/bitfield-load-unsigned.qbe b/test/bitfield-load-unsigned.qbe
new file mode 100644
index 0000000..c4ea94b
--- /dev/null
+++ b/test/bitfield-load-unsigned.qbe
@@ -0,0 +1,14 @@
+export
+function $f() {
+@start.1
+@body.2
+ %.1 =l copy $s
+ %.2 =l mul 0, 1
+ %.3 =l add %.1, %.2
+ %.4 =l copy %.3
+ %.5 =w loaduw %.4
+ %.6 =w shl %.5, 13
+ %.7 =w shr %.6, 17
+ ret
+}
+export data $s = align 4 { z 4 }