diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2020-07-02 20:33:45 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2020-07-02 20:39:17 +0100 |
commit | 75fbb41d2857d93208c74a8e0228b29fd7bf04c0 (patch) | |
tree | da66ef60bc1a7cd5f072fc8926d30c998cbf9e82 | |
parent | 4704d9eba6d8017dc694c077ca4205ffd8becad8 (diff) | |
download | qemu-openbios-75fbb41d2857d93208c74a8e0228b29fd7bf04c0.tar.gz |
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>
-rw-r--r-- | forth/util/util.fs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/forth/util/util.fs b/forth/util/util.fs index 8247c7d3..54dbf910 100644 --- a/forth/util/util.fs +++ b/forth/util/util.fs @@ -102,3 +102,18 @@ 2dup " tell" is-relay 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] |