mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
- hook up new 64bit words into fcode table.
- dummy implementations for peek, poke, ms and get-msecs git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@617 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -368,12 +368,21 @@ defer fcode-c@ \ get byte
|
|||||||
\ b(lit) ( -- n1 )
|
\ b(lit) ( -- n1 )
|
||||||
\ Numeric literal FCode. Followed by FCode-num32.
|
\ Numeric literal FCode. Followed by FCode-num32.
|
||||||
|
|
||||||
|
64bit? [IF]
|
||||||
|
: b(lit)
|
||||||
|
fcode-num32 32>64
|
||||||
|
state @ if
|
||||||
|
['] (lit) , ,
|
||||||
|
then
|
||||||
|
; immediate
|
||||||
|
[ELSE]
|
||||||
: b(lit)
|
: b(lit)
|
||||||
fcode-num32
|
fcode-num32
|
||||||
state @ if
|
state @ if
|
||||||
['] (lit) , ,
|
['] (lit) , ,
|
||||||
then
|
then
|
||||||
; immediate
|
; immediate
|
||||||
|
[THEN]
|
||||||
|
|
||||||
|
|
||||||
\ b(') ( -- xt )
|
\ b(') ( -- xt )
|
||||||
|
|||||||
@@ -21,21 +21,27 @@ hex
|
|||||||
\ 5.3.7.1 Peek/poke
|
\ 5.3.7.1 Peek/poke
|
||||||
|
|
||||||
: cpeek ( addr -- false | byte true )
|
: cpeek ( addr -- false | byte true )
|
||||||
|
c@ true
|
||||||
;
|
;
|
||||||
|
|
||||||
: wpeek ( waddr -- false | w true )
|
: wpeek ( waddr -- false | w true )
|
||||||
|
w@ true
|
||||||
;
|
;
|
||||||
|
|
||||||
: lpeek ( qaddr -- false | quad true )
|
: lpeek ( qaddr -- false | quad true )
|
||||||
|
l@ true
|
||||||
;
|
;
|
||||||
|
|
||||||
: cpoke ( byte addr -- okay? )
|
: cpoke ( byte addr -- okay? )
|
||||||
|
c! true
|
||||||
;
|
;
|
||||||
|
|
||||||
: wpoke ( w waddr -- okay? )
|
: wpoke ( w waddr -- okay? )
|
||||||
|
w! true
|
||||||
;
|
;
|
||||||
|
|
||||||
: lpoke ( quad qaddr -- okay? )
|
: lpoke ( quad qaddr -- okay? )
|
||||||
|
l! true
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
@@ -59,13 +65,33 @@ hex
|
|||||||
: rl! ( quad qaddr -- )
|
: rl! ( quad qaddr -- )
|
||||||
;
|
;
|
||||||
|
|
||||||
|
: rx@ ( oaddr - o )
|
||||||
|
state @ if
|
||||||
|
h# 22e get-token if , else execute then
|
||||||
|
else
|
||||||
|
h# 22e get-token drop execute
|
||||||
|
then
|
||||||
|
; immediate
|
||||||
|
|
||||||
|
: rx! ( o oaddr -- )
|
||||||
|
state @ if
|
||||||
|
h# 22f get-token if , else execute then
|
||||||
|
else
|
||||||
|
h# 22f get-token drop execute
|
||||||
|
then
|
||||||
|
; immediate
|
||||||
|
|
||||||
\ 5.3.7.3 Time
|
\ 5.3.7.3 Time
|
||||||
|
|
||||||
|
0 value dummy-msecs
|
||||||
|
|
||||||
: get-msecs ( -- n )
|
: get-msecs ( -- n )
|
||||||
|
dummy-msecs dup 1+ to dummy-msecs
|
||||||
;
|
;
|
||||||
|
|
||||||
: ms ( n -- )
|
: ms ( n -- )
|
||||||
|
get-msecs +
|
||||||
|
begin dup get-msecs < until
|
||||||
;
|
;
|
||||||
|
|
||||||
: alarm ( xt n -- )
|
: alarm ( xt n -- )
|
||||||
|
|||||||
@@ -380,7 +380,13 @@ create fcode-master-table
|
|||||||
['], lbflip
|
['], lbflip
|
||||||
['], lbflips
|
['], lbflips
|
||||||
['], adr-mask
|
['], adr-mask
|
||||||
6 n['], reserved-fcode \ 22a-22f
|
4 n['], reserved-fcode \ 22a-22d
|
||||||
|
64bit? [IF]
|
||||||
|
['], (rx@)
|
||||||
|
['], (rx!)
|
||||||
|
[ELSE]
|
||||||
|
2 n['], reserved-fcode \ 22e-22f
|
||||||
|
[THEN]
|
||||||
['], rb@
|
['], rb@
|
||||||
['], rb!
|
['], rb!
|
||||||
['], rw@
|
['], rw@
|
||||||
@@ -398,8 +404,33 @@ create fcode-master-table
|
|||||||
['], byte-load
|
['], byte-load
|
||||||
['], set-args
|
['], set-args
|
||||||
['], left-parse-string \ 240
|
['], left-parse-string \ 240
|
||||||
|
64bit? [IF]
|
||||||
|
['], bxjoin
|
||||||
|
['], <l@
|
||||||
|
['], lxjoin
|
||||||
|
['], wxjoin
|
||||||
|
['], x,
|
||||||
|
['], x@
|
||||||
|
['], x!
|
||||||
|
['], /x
|
||||||
|
['], /x*
|
||||||
|
\ ['], /xa+
|
||||||
|
\ ['], /xa1+
|
||||||
|
['], xbflip
|
||||||
|
['], xbflips
|
||||||
|
['], xbsplit
|
||||||
|
['], xlflip
|
||||||
|
['], xlflips
|
||||||
|
['], xlsplit
|
||||||
|
['], xwflip
|
||||||
|
['], xwflips
|
||||||
|
['], xwsplit
|
||||||
|
[ELSE]
|
||||||
7 n['], reserved-fcode \ 241-247 (Part of IEEE1275 64-bit draft standard)
|
7 n['], reserved-fcode \ 241-247 (Part of IEEE1275 64-bit draft standard)
|
||||||
['], /x
|
['], /x
|
||||||
|
c n['], reserved-fcode \ 249-254 (Part of IEEE1275 64-bit draft standard)
|
||||||
|
[THEN]
|
||||||
|
|
||||||
|
|
||||||
here fcode-master-table - constant fcode-master-table-size
|
here fcode-master-table - constant fcode-master-table-size
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user