diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-03-07 19:55:03 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-03-07 19:55:03 -0800 |
commit | 44798a2e2cff818dda287d7d1232fa9b55b3f36d (patch) | |
tree | 370fc6f760c8e67804c1f1c956c8a3e2753aaf62 /mu_instructions | |
parent | 39aea1792666b062665afe4819ed904aa02a32b8 (diff) | |
download | mu-44798a2e2cff818dda287d7d1232fa9b55b3f36d.tar.gz |
6097
I thought I needed to support compute-offset with literal index, but in that case might as well just use an index literal directly. The 'index' instruction with literals already supports non-power-of-2 sizes.
Diffstat (limited to 'mu_instructions')
-rw-r--r-- | mu_instructions | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mu_instructions b/mu_instructions index c8be987b..9897d6c0 100644 --- a/mu_instructions +++ b/mu_instructions @@ -218,8 +218,6 @@ var/reg: (offset T) <- compute-offset arr: (addr array T), idx/regi: int # arr {.name="compute-offset", .inouts=[arr, regi], .outputs=[reg], .subx-name="69/multiply", .rm32=inouts[1], .r32=outputs[0], .imm32=sizeof(T)} var/reg: (offset T) <- compute-offset arr: (addr array T), idx: int # arr can be in reg or mem {.name="compute-offset", .inouts=[arr, regi], .outputs=[reg], .subx-name="69/multiply", .rm32="*(ebp+" inouts[1].stack-offset ")", .r32=outputs[0], .imm32=sizeof(T)} -var: (offset T) <- compute-offset arr: (addr array T), n # arr can be in reg or mem - {.name="compute-offset", .inouts=[var, n], .outputs=[reg], .subx-name="c7 0/subop/copy", .rm32=outputs[0], .imm32=sizeof(T)*n} var/reg <- index arr/rega: (addr array T), o/rego: offset {.name="index", .inouts=[rega, rego], .outputs=[reg], .subx-name="8d/copy-address", .rm32="*(" inouts[0] "+" inouts[1] "+" "4)", .r32=outputs[0]} |