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 / branch-C.spec

31 lines · 1358 bytes Raw Blame History
1@ng a64-enc
2; branch ngC: ngL with both branches if-converted: the Collatz step computes x >> 1 and 3x + 1 and picks
3; one with CSEL on TST x, #1; the max update is CMP + CSEL hi. Same loop shape, same bound counter.
4; @old 0x40027c 0xd2884804 0xf2a001e4 0xeb04007f 0x54000382 0x91000464 0xd2800005 0xd2800006 0xf100049f 0x54000220 0xd2884808 0xf2a001e8 0xeb0800df 0x54000ee2 0x910004c6 0xd2800028 0x8a080089 0xf100013f 0x54000061 0xd341fc84 0x14000004 0xd2800068 0x9b087c89 0x91000524 0x910004a5 0x17ffffef 0x8b050021 0xeb0200bf 0x54000049 0xaa0503e2 0x91000463 0x17ffffe2
5; @at 0x40027c
6movzx 7 0x4240 0 | mov x7, #0x4240
7movkx 7 0xf 1 | movk x7, #0xf, lsl #16
8addxi 4 3 1 0 | add x4, x3, #0x1
9movzx 5 0 0 | mov x5, #0x0
10movzx 6 0 0 | mov x6, #0x0
11subsxi 31 4 1 0 | cmp x4, #0x1
12bcond 0 12 | b.eq @+48
13subsx 31 6 7 | cmp x6, x7
14bcond 2 123 | b.cs @+492
15addxi 6 6 1 0 | add x6, x6, #0x1
16ubfmx 9 4 1 63 | lsr x9, x4, #1
17addx 10 4 4 0 1 | add x10, x4, x4, lsl #1
18addxi 10 10 1 0 | add x10, x10, #0x1
19andsxi 31 4 0x1 | tst x4, #0x1
20cselx 4 10 9 1 | csel x4, x10, x9, ne
21addxi 5 5 1 0 | add x5, x5, #0x1
22subsxi 31 4 1 0 | cmp x4, #0x1
23bcond 1 -10 | b.ne @-40
24addx 1 1 5 | add x1, x1, x5
25subsx 31 5 2 | cmp x5, x2
26cselx 2 5 2 8 | csel x2, x5, x2, hi
27addxi 3 3 1 0 | add x3, x3, #0x1
28subsx 31 3 7 | cmp x3, x7
29bcond 3 -21 | b.cc @-84
30b 7 | b @+28
31; @nop 0x4002f8