about summary refs log tree commit diff stats
path: root/mu_instructions
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-11-27 00:00:40 -0800
committerKartik Agaram <vc@akkartik.com>2020-11-27 00:04:54 -0800
commit125bfde435b4727cbc8d31bc86f47dc75b825d5e (patch)
tree01da8729bb03497f8698b0fb9e51e7596d696161 /mu_instructions
parentc165b0be5a83b7b8b16552385b38af74d68a3730 (diff)
downloadmu-125bfde435b4727cbc8d31bc86f47dc75b825d5e.tar.gz
7286 - mu.subx: isolate bytes from previous values
Diffstat (limited to 'mu_instructions')
-rw-r--r--mu_instructions2
1 files changed, 2 insertions, 0 deletions
diff --git a/mu_instructions b/mu_instructions
index ba8dd2cf..7c3d8d6c 100644
--- a/mu_instructions
+++ b/mu_instructions
@@ -115,7 +115,9 @@ copy-to var, n                    => "c7 0/subop/copy *(ebp+" var.stack-offset "
 copy-to *var/reg, n               => "c7 0/subop/copy *" reg " " n "/imm32"
 
 var/reg <- copy-byte var2/reg2    => "8a/byte-> %" reg2 " " reg "/r32"
+                                     "81 4/subop/and %" reg " 0xff/imm32"
 var/reg <- copy-byte *var2/reg2   => "8a/byte-> *" reg2 " " reg "/r32"
+                                     "81 4/subop/and %" reg " 0xff/imm32"
 copy-byte-to *var1/reg1, var2/reg2  => "88/byte<- *" reg1 " " reg2 "/r32"
 
 compare var1, var2/reg2           => "39/compare *(ebp+" var1.stack-offset ") " reg2 "/r32"