diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-05-24 19:46:47 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-05-24 19:46:47 -0700 |
commit | 27b1e19ebec31eca1d29c4b8f18408b02c172578 (patch) | |
tree | 3497d9179793503de0783c05a444f1c6e3fb6fa3 /mu_instructions | |
parent | 1eecd0934f7bda8afbd40c5594d809a464057054 (diff) | |
download | mu-27b1e19ebec31eca1d29c4b8f18408b02c172578.tar.gz |
6392 - 'length' instruction done in all complexity
Diffstat (limited to 'mu_instructions')
-rw-r--r-- | mu_instructions | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mu_instructions b/mu_instructions index 754f51bb..865572eb 100644 --- a/mu_instructions +++ b/mu_instructions @@ -191,7 +191,7 @@ var/reg <- length arr/reg2: (addr array T) | if size-of(T) is 4 or 8 or 16 or 32 or 64 or 128 => "8b/-> *" reg2 " " reg "/r32" "c1/shift 5/subop/logic-right %" reg " " log2(size-of(T)) "/imm8" - | otherwise (TODO) + | otherwise x86 has no instruction to divide by a literal, so we need up to 3 extra registers! eax/edx for division and say ecx => if reg is not eax |