diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-06-12 22:26:45 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-06-12 22:34:22 -0700 |
commit | f99cd767a4a4eb400ebefcf45a7a9dab5137ec6a (patch) | |
tree | 608585daef61d1f94c1bf596cdebe88bddc2ac96 /108write.subx | |
parent | 0511b9fd1170da575170bcde2fa617969cbf6a53 (diff) | |
download | mu-f99cd767a4a4eb400ebefcf45a7a9dab5137ec6a.tar.gz |
periodic run of misc_checks
I should really stop using /disp8 jumps at the top-level given how inconvenient it is to check for overly large offsets.
Diffstat (limited to '108write.subx')
-rw-r--r-- | 108write.subx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/108write.subx b/108write.subx index 9dc9742b..952ed909 100644 --- a/108write.subx +++ b/108write.subx @@ -141,7 +141,7 @@ try-write: # f: (addr stream byte), s: (addr array byte) -> overflow?/eax: bool 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp # if (s == 0) return 81 7/subop/compare 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 0/imm32 # compare *(ebp+12) - 74/jump-if-= $write:end/disp8 + 74/jump-if-= $try-write:end/disp8 # . save registers 51/push-ecx # if (f->size - f->write < s->size) return @@ -202,7 +202,7 @@ stream-size: # f: (addr stream byte) -> n/eax: int 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax # . restore registers 59/pop-to-ecx -$space-remaining-in-stream:end: +$stream-size:end: # . epilogue 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp 5d/pop-to-ebp |