This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Volatile memory is not general operand


Hi,

I just noticed something very surprising. There's a clause in general_operand (recog.c):

    if (! volatile_ok && MEM_VOLATILE_P (op))
        return 0;

Oh... so, a MEM_VOLATILE_P is _not_ a general operand? Why? This is also not referred to in the documentation of general operand so it kind of caught me by surprise.

Before gimplification I have: INT_PRIORITIESD.10391[iD.10456] ={v} 0;

This is converted to a couple of insn that combine tries to combine into:
(set (mem/s/v:QImode ...) (const_int 0))

I have a
(set (match_operand:QImode "nonimmediate_operand" "")
     (match_operand:QImode "general_operand" ""))

However, the insn doesn't match cause nonimmediate_operand returns false for (mem/s/v ...).

Why is this? And what can I do to match this set? I guess I can only create another pattern. I am just amazed that a volatile memory is not a general_operand.

Cheers,

PMatos


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]