[Vm-dev] Why does CogARMCompiler>>msr: yield MSRNE?

tim Rowledge tim at rowledge.org
Thu Sep 17 18:32:42 UTC 2020



> On 2020-09-17, at 12:25 AM, Boris Shingarov <boris at shingarov.com> wrote:
> 
> I just noticed something unusual in CogARMCompiler>>msr:.
> 
> The field cond -- which comes from the leftmost nibble of 16r1328F000 -- is 1, i.e. NE.
> 
Huh. That does look weird. Why would I have done that?

> So in fact we are emitting MSRNE, not MSR.  Is this on purpose? Or should the code read ^16rE328F000 + ... + ... ?  (E for "Always")

OK, found it. It's only used in #genMulR:R; in a place where we have just tested the condition codes and only want to transfer the V flag if the prior multiply  overflow test requires it.

Boy, that could do with better comments. I'll try to provide some soon.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: RCR: Rewind Card Reader




More information about the Vm-dev mailing list