From 114641e2c81805bd99a5713237af3fb16d7ddc10 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 14 Mar 2020 14:46:45 -0700 Subject: 6145 - 'address' operator This could be a can of worms, but I think I have a set of checks that will keep use of addresses type-safe. --- mu_instructions | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mu_instructions') diff --git a/mu_instructions b/mu_instructions index a66ea67e..430a4651 100644 --- a/mu_instructions +++ b/mu_instructions @@ -205,6 +205,11 @@ loop-if-addr<= label {.name="loop-if-addr<=", .inouts=[label], loop-if-addr>= {.name="loop-if-addr>=", .subx-name="0f 83/jump-if-addr>= loop/disp32"} loop-if-addr>= label {.name="loop-if-addr>=", .inouts=[label], .subx-name="0f 83/jump-if-addr>=", .disp32=inouts[0] ":loop"} +Address operations + +var/reg: (addr T) <- address var: T + {.name="address", .inouts=[var], .outputs=[reg], .subx-name="8d/copy-address", .rm32="*(ebp+" inouts[0].stack-offset ")", .r32=outputs[0]} + Array operations var/reg <- length arr/reg2: (addr array T) -- cgit 1.4.1-2-gfad0