diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-12-23 03:33:56 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-12-23 03:33:56 -0500 |
commit | 3b0ad0c84111be433de39b8a74c03db7e99cb686 (patch) | |
tree | b7f7149953d1523a5824b0c04e4d31591e2bc0bd /tnslc/compile/isa_x86.tnsl | |
parent | 2ec32dac56b544bc4851a3efddf75ee5fd9314ed (diff) |
Add initial value functions
Diffstat (limited to 'tnslc/compile/isa_x86.tnsl')
-rw-r--r-- | tnslc/compile/isa_x86.tnsl | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tnslc/compile/isa_x86.tnsl b/tnslc/compile/isa_x86.tnsl index 02ba899..3fda486 100644 --- a/tnslc/compile/isa_x86.tnsl +++ b/tnslc/compile/isa_x86.tnsl @@ -131,31 +131,23 @@ # - bx # - cx # - dx -# - sp -# - bp # - si # - di +# - bp +# - sp # - 8-15 #/ /; get_reg (uint size, {}uint8 common) [{}uint8] ;{}uint8 out = "%" - /; if (string_equate(common, "ax") || string_equate(common, "bx") || string_equate(common, "cx") || string_equate(common, "dx")) - - /; if (size == 1) - ;common{1} = 'l' - ;; else if (size == 4) - ;out.append('e') - ;; else if (size == 8) - ;out.append('r') - ;/ - - ;add_strings(~out, ~common) + /; if (common{0} !< 'a') - ;; else if (string_equate(common, "sp") || string_equate(common, "bp") || string_equate(common, "si") || string_equate(common, "di")) - /; if (size == 1) - ;common.append('l') + /; if(common{1} == 'x') + ;common{1} = 'l' + ;; else + ;common.append('l') + ;/ ;; else if (size == 4) ;out.append('e') ;; else if (size == 8) |