diff options
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) |