Day 30 of making my own indie MMO without engine or team
I've made some progress on the IR for my JIT compiler, this is the 4th day I've worked on this so far and it's more draining to me than gamedev stuff.
The general idea is to have something that is a bit more high-level than assembler (as in: it's 'slightly' typed, shims instructions from other arches), but a bit more low level than C (no std, only register ops + memory load/store), that will be used only to implement memory unsafe data structures I'll be using for gameplay stuff for the scripting language (that will compile to this ir, and won't be turing complete).
So far I support:
add.wu64 $hi_a, $hi_b ?carry($-1)
I'm still thinking about how I want to handle stuff like vectorization and floating point operations, but that's not a priority since I only need the stuff to implement data structures here.
#woao #solodev #gamedev #indiedev #mmo #devlog
I've made some progress on the IR for my JIT compiler, this is the 4th day I've worked on this so far and it's more draining to me than gamedev stuff.
The general idea is to have something that is a bit more high-level than assembler (as in: it's 'slightly' typed, shims instructions from other arches), but a bit more low level than C (no std, only register ops + memory load/store), that will be used only to implement memory unsafe data structures I'll be using for gameplay stuff for the scripting language (that will compile to this ir, and won't be turing complete).
So far I support:
- add,sub,div,mul,rem,sl,sr,rl,rr,and,or,xor,max,min
- not,clz,ctz,cnt,rbit,rbyte
- jmp (risc-v inspired, can jump to block or to register, target block receives $return), I like that this design is tail-call friendly and has the concept of phi built-in.
- copy/move/swap dst, src, len
- cas, and memory load/store with packed layout (the intent is to add cabi/spirv layouts too)
- error handling (I only have recursive descent parser errors), mostly because my typing is incomplete. Honestly this is such a pain to do in C... The good thing is that for now I'll only have .wu8/16/32 (wrapping ops) and .su8/16/32 (saturated ops)
- x86_64 support, for now I have been working on aarch64 only since encoding aarch64 is really easy while x86_64 is not fun.
- statement predication (stuff like op arg, arg ?eq($-1)), the idea is to use it to allow stuff like
add.wu64 $hi_a, $hi_b ?carry($-1)
I'm still thinking about how I want to handle stuff like vectorization and floating point operations, but that's not a priority since I only need the stuff to implement data structures here.
#woao #solodev #gamedev #indiedev #mmo #devlog
