[OpenBIOS] [commit] r912 - trunk/openbios-devel/forth/bootstrap
repository service
svn at openbios.org
Sun Oct 17 11:10:09 CEST 2010
Author: mcayland
Date: Sun Oct 17 11:10:09 2010
New Revision: 912
URL: http://tracker.coreboot.org/trac/openbios/changeset/912
Log:
Fix up the new 2>r, 2r> and 2r@ words.
As pointed out by Tarl, since these are called as separate words (and not inline), we need to preserve the top-most R stack item
as this is return address of the word itself.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>
Modified:
trunk/openbios-devel/forth/bootstrap/bootstrap.fs
Modified: trunk/openbios-devel/forth/bootstrap/bootstrap.fs
==============================================================================
--- trunk/openbios-devel/forth/bootstrap/bootstrap.fs Sun Oct 17 00:37:31 2010 (r911)
+++ trunk/openbios-devel/forth/bootstrap/bootstrap.fs Sun Oct 17 11:10:09 2010 (r912)
@@ -411,9 +411,9 @@
\ Note: these words are not part of the official OF specification, however
\ they are part of the ANSI DPANS94 core extensions (see section 6.2) and
\ so this seems an appropriate place for them.
-: 2>r swap >r >r ;
-: 2r> r> r> swap ;
-: 2r@ r> r> 2dup >r >r swap ;
+: 2>r r> -rot swap >r >r >r ;
+: 2r> r> r> r> rot >r swap ;
+: 2r@ r> r> r> 2dup >r >r rot >r swap ;
\
\ 7.3.2.1 - single precision integer arithmetic (part 1)
More information about the OpenBIOS
mailing list