On Wed, May 09, 2018 at 07:51:43PM +0100, Mark Cave-Ayland wrote:
On 09/05/18 15:07, Segher Boessenkool wrote:
On Wed, May 09, 2018 at 08:27:14AM -0400, Jd Lyons wrote:
Bear with me, while I try to understand this, but it looks like b?branch sets up some type of temporary buffer, and b(>resolve) try to “flush” that buffer.
Yes; and that is incorrect. b?branch in interpret mode is only allowed for forward branches (which you have here), and it should simply skip that much forward (in the fcode stream) if the top of stack was 0. Not compile anything.
I'm not sure that's strictly true; certainly this is a difference in how the FCode part of the IEEE-1275 specification is implemented in OpenBIOS compared to others, but I wouldn't classify it outright as wrong.
It can be used for example to conditionally use the 64-bit extensions. This won't work if you try to compile things that are supposed to be stepped over ;-)
Not that I see what is exactly going wrong here...
Segher