<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">Hi Nicolas,</div><div dir="ltr"><br><blockquote type="cite">On Jan 2, 2021, at 12:33 AM, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span><div dir="auto"><div dir="ltr"><div>Hi both,</div><div>thanks for the hint, it's not obvious indeed !</div><div>We may eventually do like the simulation, always shift the flags, something like:</div><div><br></div><div>    ^self shiftedImageHeaderFlags anyMask: 128</div><div><br></div><div>The shift method would always be inlined, and I guess that the C compiler would generate equally efficient code for those two expressions</div><div>    (flags >> 2) & 128.</div><div>    flags & 512.</div><div>Anyway, we do not check flags in tight loops, do we?<br></div></div></div></span></div></blockquote><div><br></div>No, abd actually the flags are only processed at startup, snapshot, and the vmParameter primitives.  Any flags which have an effect on execution (such as the fail-for-mixed-arithmetic flag) are extracted into variables at startup or in vmParameterAtPut abd read back into a flag bit from the variable at snapshot time.<div><br><blockquote type="cite"><div dir="ltr"><span><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 29 déc. 2020 à 05:52, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank" rel="noreferrer">eliot.miranda@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:large">Hi Nicolas,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 27, 2020 at 5:52 AM Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank" rel="noreferrer">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div>Hi all, Eliot,</div><div><br></div><div>Simulation says:</div><div><br></div><div>    ^(Smalltalk vmParameterAt: 48) anyMask: 128</div><div><br></div><div>VM says:</div><div><br></div><div>    ^imageHeaderFlags anyMask: 512</div><div><br></div><div>Is the difference intentional?<font face="arial, sans-serif"><br></font></div></div></blockquote><div><font face="arial, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, sans-serif">It is, and it's a confusing mess for which I apologize.  The issue is that the least significant two bits of the flags word are the full screen flag and the "vm is big endian" flag.  Neither of these needs a setter since the full screen flag is set via the toggle full screen primitive and the "<span style="color:rgb(0,0,0)">vm is big endian" is a constant depending on the VM.  Hence Smalltalk vmParameterAt: 48 answers the flags bit shifted right 2 bits.  I get bit by this all the time and wish I had not introduced the shift.  Back in early October in </span><span style="color:rgb(0,0,0)">VMMaker.oscog-eem.2837 I wrote completely incorrect code that screwed up several flags until </span>VMMaker.oscog-eem.2848 that I fixed a week later.  But unfortunately the damage is done.  All we can do is comment the situation, while I beg forgiveness and forbearance.</font></div></div><div><font face="arial, sans-serif"><br></font></div><div dir="ltr"><div dir="ltr"><div><span style="border-collapse:separate"><div>_,,,^..^,,,_<br></div><div style="font-size:small">best, Eliot</div></span></div></div></div></div></div></div></div>
</blockquote></div>
</span></div></blockquote></div></body></html>