Fix various bugs in bbranch and b?branch implementations (Mark Cave-Ayland)

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@485 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-04-28 16:40:49 +00:00
parent 7948face2b
commit a924d32bcc

View File

@@ -438,22 +438,27 @@ defer fcode-c@ \ get byte
\ Unconditional branch FCode. Followed by FCode-offset. \ Unconditional branch FCode. Followed by FCode-offset.
: bbranch : bbranch
['] dobranch ,
fcode-offset 0< if \ if we jump backwards, we can forsee where it goes fcode-offset 0< if \ if we jump backwards, we can forsee where it goes
['] dobranch ,
swap
resolve-dest resolve-dest
execute-tmp-comp
else else
setup-tmp-comp ['] dobranch ,
here here
0 , 0 ,
swap
then then
; immediate ; immediate
\ b?branch ( continue? -- ) \ b?branch ( continue? -- )
\ Conditional branch FCode. Followed by FCode-offset. \ Conditional branch FCode. Followed by FCode-offset.
: b?branch : b?branch
fcode-offset 0< if \ if we jump backwards, we can forsee where it goes fcode-offset 0< if \ if we jump backwards, we can forsee where it goes
resolve-orig ['] do?branch ,
resolve-dest
execute-tmp-comp execute-tmp-comp
else else
setup-tmp-comp ['] do?branch , setup-tmp-comp ['] do?branch ,
@@ -468,10 +473,7 @@ defer fcode-c@ \ get byte
: b(<mark) : b(<mark)
setup-tmp-comp setup-tmp-comp
['] invert ,
['] do?branch ,
here here
0 ,
; immediate ; immediate