On 3/22/20 2:55 PM, Segher Boessenkool wrote:
> Maybe this stuff would be simpler (and more obviously correct) if it
> was more explicit CC_REGNUM is a fixed register, and the code would use
> it directly everywhere?

Indeed the biggest issue I have in this patch is what CC_MODE to expose from
the high-half compare.

For unsigned inequality, only the C bit is valid.  For signed inequality, only
the N + V bits.  For equality, only the Z bit.

Which I am trying to expose with the multiple creations of CC_REGNUM, which are
used within the comparison, which are indeed sanity checked vs the comparison
code via %m/%M.

But the mode of the CC_REGNUM does not necessarily match up with the mode of
the comparison that generates it.  And we do not have a CC_NVmode, so I'm using
full CCmode for that.

This is the part of the patch that could use the most feedback.


r~

Reply via email to