From ef845524e90c736b6cbab9320bc41114d421ff63 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 13 Jun 2020 20:23:51 -0700 Subject: 6516 - operations on bytes Byte-oriented addressing is only supported in a couple of instructions in SubX. As a result, variables of type 'byte' can't live on the stack, or in registers 'esi' and 'edi'. --- mu_instructions | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mu_instructions') diff --git a/mu_instructions b/mu_instructions index 5ce9e07c..7b38a1f8 100644 --- a/mu_instructions +++ b/mu_instructions @@ -90,6 +90,10 @@ var/reg <- copy n => "c7 0/subop/copy %" reg " " n "/imm32" copy-to var, n => "c7 0/subop/copy *(ebp+" var.stack-offset ") " n "/imm32" copy-to *var/reg, n => "c7 0/subop/copy *" reg " " n "/imm32" +var/reg <- copy-byte var2/reg2 => "8a/byte-> %" reg2 " " reg "/r32" +var/reg <- copy-byte *var2/reg2 => "8a/byte-> *" reg2 " " reg "/r32" +copy-byte-to *var1/reg1, var2/reg2 => "88/byte<- *" reg1 " " reg2 "/r32" + compare var1, var2/reg2 => "39/compare *(ebp+" var1.stack-offset ") " reg2 "/r32" compare *var1/reg1, var2/reg2 => "39/compare *" reg1 " " reg2 "/r32" compare var1/reg1, var2 => "3b/compare<- *(ebp+" var2.stack-offset ") " reg1 "/r32" -- cgit 1.4.1-2-gfad0