SPARC: add implementation of addr word

OpenBSD uses the addr word to retrieve the address of several framebuffer
variables during initialisation. Provide an implementation of addr which
allows OpenBSD to initialise the framebuffer correctly on SPARC32 and SPARC64.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
Mark Cave-Ayland 2020-07-02 20:33:45 +01:00
parent 4704d9eba6
commit 75fbb41d28
1 changed files with 15 additions and 0 deletions

View File

@ -102,3 +102,18 @@
2dup " tell" is-relay 2dup " tell" is-relay
2drop 2drop
; ;
\ -------------------------------------------------------------------------
\ Miscellaneous
\ -------------------------------------------------------------------------
[IFDEF] CONFIG_SPARC32 1 [ELSE] [IFDEF] CONFIG_SPARC64 1 [ELSE] 0 [THEN] [THEN] [IF]
\ Return the address of a named constant or value
: addr ( <word> -- addr )
parse-word $find if
cell +
then
;
[THEN]