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 / wasm / integers.unit.om

99 lines · 1558 bytes Raw Blame History
1note Every function is exercised by cases.tsv; canonical boundary arguments only.
2fn addu8 a uchar b uchar to uchar
3ret add a b
4end
5fn subu16 a ushort b ushort to ushort
6ret sub a b
7end
8fn mulu32 a uint b uint to uint
9ret mul a b
10end
11fn addu64 a ulong b ulong to ulong
12ret add a b
13end
14fn subi8 a byte b byte to byte
15ret sub a b
16end
17fn muli16 a short b short to short
18ret mul a b
19end
20fn addi32 a int b int to int
21ret add a b
22end
23fn addi64 a long b long to long
24ret add a b
25end
26fn subi64 a long b long to long
27ret sub a b
28end
29fn muli64 a long b long to long
30ret mul a b
31end
32fn divu64 a ulong b ulong to ulong
33ret div a b
34end
35fn divi64 a long b long to long
36ret div a b
37end
38fn remi64 a long b long to long
39ret rem a b
40end
41fn remu64 a ulong b ulong to ulong
42ret rem a b
43end
44fn shli64 a long b uint to long
45ret shl a b
46end
47fn shri64 a long b byte to long
48ret shr a b
49end
50fn shru64 a ulong b uint to ulong
51ret shr a b
52end
53fn shlu8 a uchar b uint to uchar
54ret shl a b
55end
56fn andi64 a long b long to long
57ret and a b
58end
59fn oru32 a uint b uint to uint
60ret or a b
61end
62fn xoru64 a ulong b ulong to ulong
63ret xor a b
64end
65fn negi64 a long to long
66ret neg a
67end
68fn negu8 a uchar to uchar
69ret neg a
70end
71fn noti8 a byte to byte
72ret not a
73end
74fn notbool a bool to bool
75ret not a
76end
77fn castsu a long to ulong
78ret ulong a
79end
80fn castus a ulong to long
81ret long a
82end
83fn casti8 a long to byte
84ret byte a
85end
86fn castu8 a ulong to uchar
87ret uchar a
88end
89fn voidfn a uint to void
90ret
91end
92fn voidcall a uint to void
93voidfn a
94ret
95end
96fn voidthen a uint to uint
97voidcall a
98ret a
99end