diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-02-14 22:58:18 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-02-14 22:58:18 -0800 |
commit | db2be4dd83ebfb37dc44873aa1a15ae0da47c15d (patch) | |
tree | f3c6c8f31b2a47da7f7c6036d6b3aa853a1c0a81 /subx | |
parent | db268970a93bdde7c0d1ac95ad0154fed8908cc1 (diff) | |
download | mu-db2be4dd83ebfb37dc44873aa1a15ae0da47c15d.tar.gz |
4966
Standardize how we show register allocation decisions.
Diffstat (limited to 'subx')
-rw-r--r-- | subx/067write-buffered.subx | 15 | ||||
-rw-r--r-- | subx/072slice.subx | 10 | ||||
-rw-r--r-- | subx/apps/crenshaw2-1.subx | 11 | ||||
-rw-r--r-- | subx/apps/crenshaw2-1b.subx | 11 |
4 files changed, 23 insertions, 24 deletions
diff --git a/subx/067write-buffered.subx b/subx/067write-buffered.subx index 50ec7988..94ed4f8a 100644 --- a/subx/067write-buffered.subx +++ b/subx/067write-buffered.subx @@ -22,17 +22,18 @@ write-buffered: # f : (address buffered-file), msg : (address array byte) -> <v # if (f->write >= f->length) # flush(f) # clear-stream(f) - # f->data[f->write] = *in + # c = *in + # f->data[f->write] = c # ++f->write # ++in # # registers: - # ESI : in - # ECX : inend - # EDI : f - # EDX : f->length - # EBX : f->write (cached copy, need to keep in sync) - # EAX : temp + # in: ESI + # inend: ECX + # f: EDI + # f->length: EDX + # f->write: EBX (cached; need to keep in sync) + # c: EAX # # . prolog 55/push-EBP diff --git a/subx/072slice.subx b/subx/072slice.subx index 20a39aa4..99c3d459 100644 --- a/subx/072slice.subx +++ b/subx/072slice.subx @@ -108,11 +108,11 @@ slice-equal?: # s : (address slice), p : (address string) -> EAX : boolean # return true # # registers: - # EAX : *currs - # ECX : *currp - # EDX : currs - # EBX : currp - # ESI : maxs + # currs: EDX + # maxs: ESI + # currp: EBX + # *currs: EAX + # *currp: ECX # # . prolog 55/push-EBP diff --git a/subx/apps/crenshaw2-1.subx b/subx/apps/crenshaw2-1.subx index 3fe51fd7..53b59263 100644 --- a/subx/apps/crenshaw2-1.subx +++ b/subx/apps/crenshaw2-1.subx @@ -208,12 +208,11 @@ get-num: # in : (address buffered-file), out : (address stream), err : fd or (a # Look = get-char(in) # # registers: - # ESI : in - # EDI : out - # EAX : temp - # ECX : out->write (persisted back at end) - # EDX : out->length - # EBX : temp2 + # in: ESI + # out: EDI + # out->write: ECX (cached copy; need to keep in sync) + # out->length: EDX + # temporaries: EAX, EBX # We can't allocate Look to a register because it gets written implicitly in # get-char in each iteration of the loop. (Thereby demonstrating that it's # not the right interface for us. But we'll keep it just to follow Crenshaw.) diff --git a/subx/apps/crenshaw2-1b.subx b/subx/apps/crenshaw2-1b.subx index 4fc2680b..3b828735 100644 --- a/subx/apps/crenshaw2-1b.subx +++ b/subx/apps/crenshaw2-1b.subx @@ -213,12 +213,11 @@ get-num: # in : (address buffered-file), out : (address stream), err : fd or (a # a general helper like write-byte. Maybe I should just create a local helper. # # within the loop we'll try to keep things in registers: - # ESI : in - # EDI : out - # EAX : temp - # ECX : out->write (persisted back at end) - # EDX : out->length - # EBX : temp2 + # in: ESI + # out: EDI + # out->write: ECX (cached copy; need to keep in sync) + # out->length: EDX + # temporaries: EAX, EBX # We can't allocate Look to a register because it gets written implicitly in # get-char in each iteration of the loop. (Thereby demonstrating that it's # not the right interface for us. But we'll keep it just to follow Crenshaw.) |