diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-10-31 19:55:33 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-10-31 19:55:33 -0700 |
commit | 13235878225c99275d1ae01dd3aed4aaa5b284e8 (patch) | |
tree | 2ffe16779853b6e96f9cd049f37005816c44346e | |
parent | 3f30e4c6e6598eb281331626f0f021005ba608f3 (diff) | |
download | mu-13235878225c99275d1ae01dd3aed4aaa5b284e8.tar.gz |
7147
-rw-r--r-- | html/mu_instructions.html | 11 | ||||
-rw-r--r-- | mu_instructions | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/html/mu_instructions.html b/html/mu_instructions.html index af290d70..858e9d27 100644 --- a/html/mu_instructions.html +++ b/html/mu_instructions.html @@ -37,6 +37,10 @@ Conversely, registers that are just read from must not be passed as inputs. The following chart shows all the instruction forms supported by Mu, along with the SubX instruction they're translated to. +<span class="muComment">## Integer instructions</span> + +These instructions use the general-purpose registers. + var/<span class="Constant">eax</span> <span class="SpecialChar"><-</span> increment => <span class="Constant">"40/increment-eax"</span> var/<span class="Constant">ecx</span> <span class="SpecialChar"><-</span> increment => <span class="Constant">"41/increment-ecx"</span> var/<span class="Constant">edx</span> <span class="SpecialChar"><-</span> increment => <span class="Constant">"42/increment-edx"</span> @@ -150,11 +154,10 @@ compare *var/reg, n => <span class="Constant">"81 7/subop/ var/reg <span class="SpecialChar"><-</span> multiply var2 => <span class="Constant">"0f af/multiply *(ebp+"</span> var2.stack-offset <span class="Constant">") "</span> reg <span class="Constant">"/r32"</span> var/reg <span class="SpecialChar"><-</span> multiply *var2/reg2 => <span class="Constant">"0f af/multiply *"</span> reg2 <span class="Constant">" "</span> reg <span class="Constant">"/r32"</span> -<span class="muComment"># Floating-point operations</span> +<span class="muComment">## Floating-point operations</span> -All the instructions so far use Intel's general-purpose integer registers. -However, some of them translate to different SubX if their arguments are in -floating-point registers. +These instructions operate on either floating-point registers (xreg) or +general-purpose registers (reg) in indirect mode. var/xreg <span class="SpecialChar"><-</span> add var2/xreg2 => <span class="Constant">"f3 0f 58/add %"</span> xreg2 <span class="Constant">" "</span> xreg1 <span class="Constant">"/x32"</span> var/xreg <span class="SpecialChar"><-</span> add var2 => <span class="Constant">"f3 0f 58/add *(ebp+"</span> var2.stack-offset <span class="Constant">") "</span> xreg <span class="Constant">"/x32"</span> diff --git a/mu_instructions b/mu_instructions index 8879c878..f0e66917 100644 --- a/mu_instructions +++ b/mu_instructions @@ -13,6 +13,10 @@ Conversely, registers that are just read from must not be passed as inputs. The following chart shows all the instruction forms supported by Mu, along with the SubX instruction they're translated to. +## Integer instructions + +These instructions use the general-purpose registers. + var/eax <- increment => "40/increment-eax" var/ecx <- increment => "41/increment-ecx" var/edx <- increment => "42/increment-edx" @@ -126,11 +130,10 @@ compare *var/reg, n => "81 7/subop/compare *" reg " " n "/imm32" var/reg <- multiply var2 => "0f af/multiply *(ebp+" var2.stack-offset ") " reg "/r32" var/reg <- multiply *var2/reg2 => "0f af/multiply *" reg2 " " reg "/r32" -# Floating-point operations +## Floating-point operations -All the instructions so far use Intel's general-purpose integer registers. -However, some of them translate to different SubX if their arguments are in -floating-point registers. +These instructions operate on either floating-point registers (xreg) or +general-purpose registers (reg) in indirect mode. var/xreg <- add var2/xreg2 => "f3 0f 58/add %" xreg2 " " xreg1 "/x32" var/xreg <- add var2 => "f3 0f 58/add *(ebp+" var2.stack-offset ") " xreg "/x32" |