From ea4a14c7a4943498f49c26824d68a8d4776c5ddc Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 14 Apr 2019 12:28:14 -0700 Subject: Initial support for loading/storing bit-fields --- tests/bitfield-load-unsigned.qbe | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/bitfield-load-unsigned.qbe (limited to 'tests/bitfield-load-unsigned.qbe') diff --git a/tests/bitfield-load-unsigned.qbe b/tests/bitfield-load-unsigned.qbe new file mode 100644 index 0000000..c4ea94b --- /dev/null +++ b/tests/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 } -- cgit v1.2.3