From db2be4dd83ebfb37dc44873aa1a15ae0da47c15d Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 14 Feb 2019 22:58:18 -0800 Subject: 4966 Standardize how we show register allocation decisions. --- subx/apps/crenshaw2-1.subx | 11 +++++------ subx/apps/crenshaw2-1b.subx | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'subx/apps') 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.) -- cgit 1.4.1-2-gfad0