According to structures.fs the fields in struct instance are cell size which is 4 bytes on 32-bit systems and 8 bytes on 64-bit systems.
my-address incorrectly assumes that the fields are always "l" (4 byte) size which causes it to return the wrong value on SPARC64. Fix the issue by updating my-address to use the cell size to calculate its offsets.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- forth/device/package.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/forth/device/package.fs b/forth/device/package.fs index f83ef7a..e0fd2d2 100644 --- a/forth/device/package.fs +++ b/forth/device/package.fs @@ -183,9 +183,9 @@ defer find-dev : my-address ( -- phys.lo ... ) ?my-self >in.device-node @
dn.probe-addr
- my-#acells tuck /l* + swap 1- 0 + my-#acells tuck /n* + swap 1- 0 ?do - /l - dup l@ swap + /n - dup @ swap loop drop ;