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 / linear-F.spec

34 lines · 1435 bytes Raw Blame History
1@ng a64-enc
2; linear ngF: ngB with instruction selection for f32 loads: LDR S straight into the FP register, then
3; FCVT (2 instructions where omc spends LDR W + FMOV + FCVT).
4; @old 0x4000b4 0xf104009f 0x54000462 0xb8647806 0x1e2700c0 0x1e22c015 0xd2802008 0x9b087c66 0xd2802009 0x9b097c88 0xd2800009 0xf104013f 0x54000262 0xd288000a 0xeb0a00df 0x540002c2 0xb866782b 0x1e270160 0x1e22c01b 0xd2a0002d 0xeb0d011f 0x54000202 0xb868784e 0x1e2701c0 0x1e22c01e 0x1e7e0b7f 0x1e7f2ab5 0x910004c6 0x91000508 0x91000529 0x17ffffed 0x9e6602a5 0xaa0503e0 0xd65f03c0
5; @at 0x4000b4
6subsxi 31 4 256 0 | cmp x4, #0x100
7bcond 2 35 | b.cs @+140
8ldrsr 0 0 4 1 | ldr s0, [x0, x4, lsl #2]
9fcvtds 21 0 | fcvt d21, s0
10movzx 8 256 0 | mov x8, #0x100
11mulx 6 3 8 | mul x6, x3, x8
12mulx 8 4 8 | mul x8, x4, x8
13movzx 10 0x3f00 0 | mov x10, #0x3f00
14subsx 31 6 10 | cmp x6, x10
15bcond 8 27 | b.hi @+108
16movzx 13 0xff00 0 | mov x13, #0xff00
17subsx 31 8 13 | cmp x8, x13
18bcond 8 24 | b.hi @+96
19movzx 9 0 0 | mov x9, #0x0
20ldrsr 0 1 6 1 | ldr s0, [x1, x6, lsl #2]
21fcvtds 27 0 | fcvt d27, s0
22ldrsr 1 2 8 1 | ldr s1, [x2, x8, lsl #2]
23fcvtds 30 1 | fcvt d30, s1
24fmuld 31 27 30 | fmul d31, d27, d30
25faddd 21 21 31 | fadd d21, d21, d31
26addxi 6 6 1 0 | add x6, x6, #0x1
27addxi 8 8 1 0 | add x8, x8, #0x1
28addxi 9 9 1 0 | add x9, x9, #0x1
29subsxi 31 9 256 0 | cmp x9, #0x100
30bcond 3 -10 | b.cc @-40
31fmovxd 5 21 | fmov x5, d21
32orrx 0 31 5 | mov x0, x5
33ret 30 | ret
34; @nop 0x400138