On Wed, Apr 10, 2024 at 7:56 PM Segher Boessenkool
<seg...@kernel.crashing.org> wrote:
>
> On Sun, Apr 07, 2024 at 08:31:38AM +0200, Uros Bizjak wrote:
> > If there are no further comments, I plan to commit the referred patch
> > to the mainline on Wednesday. The latest version can be considered an
> > obvious patch that solves certain oversight in the original
> > implementation.
>
> This is never okay.  You cannot commit a patch without approval, *ever*.
>
> That patch is also obvious -- obviously *wrong*, that is.  There are
> big assumptions everywhere in the compiler how a CC reg can be used.
> This violates that, as explained elsewhere.

Can you please elaborate what is wrong with this concrete patch. The
part that the patch touches has several wrong assumptions, and the
fixed "???" comment just emphasizes that. I don't see what is wrong
with:

(define_insn "@pushfl<mode>2"
  [(set (match_operand:W 0 "push_operand" "=<")
    (unspec:W [(match_operand 1 "flags_reg_operand")]
          UNSPEC_PUSHFL))]
  "GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_CC"
  "pushf{<imodesuffix>}"
  [(set_attr "type" "push")
   (set_attr "mode" "<MODE>")])

it is just a push of the flags reg to the stack. If the push can't be
described in this way, then it is the middle end at fault, we can't
just change modes at will.

Feel free to revert the patch, I will unassign myself from the PR.

Uros.

Reply via email to