interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / ng / bench / hand / matmul-L.spec

47 lines · 2152 bytes Raw Blame History
1@ng a64-enc
2; matmul ngL: the leaf mm (omc 0x4002bc..0x400370; ma 0x10800020, mb 0x108afca0, mc 0x1095f920, 90000
3; elements each) with the limit 90000, the three bases and 300 hoisted into x7, x9, x12, x15, x16 (LICM),
4; all three loops tested at the bottom (rotation; 0 < 300 on entry). The three bounds checks (trap 3,
5; 0x400380) are kept; MUL + ADD stays (no MADD).
6; @old 0x4002bc 0xd2800000 0xf104b01f 0x54000562 0xd2802582 0x9b027c01 0xd2800002 0xf104b05f 0x54000482 0xd2800003 0xaa0203e4 0xd2800005 0xf104b0bf 0x540002a2 0x8b050026 0xd28bf208 0xf2a00028 0xeb0800df 0x54000402 0xd2800409 0xf2a21009 0xf866792a 0xd28bf20b 0xf2a0002b 0xeb0b009f 0x54000322 0xd29f940c 0xf2a2114c 0xf864798d 0x9b0d7d4e 0x8b0e0063 0x9104b084 0x910004a5 0x17ffffeb 0x8b020025 0xd28bf206 0xf2a00026 0xeb0600bf 0x54000182 0xd29f2408 0xf2a212a8 0xf8257903 0x91000442 0x17ffffdc 0x91000400 0x17ffffd5 0xd65f03c0
7; @at 0x4002bc
8movzx 0 0 0 | mov x0, #0x0
9movzx 7 0x5f90 0 | mov x7, #0x5f90
10movkx 7 0x1 1 | movk x7, #0x1, lsl #16
11movzx 9 0x20 0 | mov x9, #0x20
12movkx 9 0x1080 1 | movk x9, #0x1080, lsl #16
13movzx 12 0xfca0 0 | mov x12, #0xfca0
14movkx 12 0x108a 1 | movk x12, #0x108a, lsl #16
15movzx 15 0xf920 0 | mov x15, #0xf920
16movkx 15 0x1095 1 | movk x15, #0x1095, lsl #16
17movzx 16 300 0 | mov x16, #0x12c
18mulx 1 0 16 | mul x1, x0, x16
19movzx 2 0 0 | mov x2, #0x0
20movzx 3 0 0 | mov x3, #0x0
21addxi 4 2 0 0 | add x4, x2, #0x0
22movzx 5 0 0 | mov x5, #0x0
23addx 6 1 5 | add x6, x1, x5
24subsx 31 6 7 | cmp x6, x7
25bcond 2 32 | b.cs @+128
26ldrxr 10 9 6 1 | ldr x10, [x9, x6, lsl #3]
27subsx 31 4 7 | cmp x4, x7
28bcond 2 29 | b.cs @+116
29ldrxr 13 12 4 1 | ldr x13, [x12, x4, lsl #3]
30mulx 14 10 13 | mul x14, x10, x13
31addx 3 3 14 | add x3, x3, x14
32addxi 4 4 300 0 | add x4, x4, #0x12c
33addxi 5 5 1 0 | add x5, x5, #0x1
34subsx 31 5 16 | cmp x5, x16
35bcond 3 -12 | b.cc @-48
36addx 5 1 2 | add x5, x1, x2
37subsx 31 5 7 | cmp x5, x7
38bcond 2 19 | b.cs @+76
39strxr 3 15 5 1 | str x3, [x15, x5, lsl #3]
40addxi 2 2 1 0 | add x2, x2, #0x1
41subsx 31 2 16 | cmp x2, x16
42bcond 3 -22 | b.cc @-88
43addxi 0 0 1 0 | add x0, x0, #0x1
44subsx 31 0 16 | cmp x0, x16
45bcond 3 -27 | b.cc @-108
46ret 30 | ret
47; @nop 0x400374